@@ -999,10 +999,10 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/aa379630(v=vs.85).aspx
999
999
1000
1000
# initial query to determine the necessary buffer size
1001
1001
$TokenGroupsPtrSize = 0
1002
- $Success = $Advapi32::GetTokenInformation($hProcToken , 2, 0, $TokenGroupsPtrSize, [ref]$TokenGroupsPtrSize)
1002
+ $Success = $Advapi32::GetTokenInformation($TokenHandle , 2, 0, $TokenGroupsPtrSize, [ref]$TokenGroupsPtrSize)
1003
1003
[IntPtr]$TokenGroupsPtr = [System.Runtime.InteropServices.Marshal]::AllocHGlobal($TokenGroupsPtrSize)
1004
1004
1005
- $Success = $Advapi32::GetTokenInformation($hProcToken , 2, $TokenGroupsPtr, $TokenGroupsPtrSize, [ref]$TokenGroupsPtrSize);$LastError = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
1005
+ $Success = $Advapi32::GetTokenInformation($TokenHandle , 2, $TokenGroupsPtr, $TokenGroupsPtrSize, [ref]$TokenGroupsPtrSize);$LastError = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
1006
1006
1007
1007
if ($Success) {
1008
1008
$TokenGroups = $TokenGroupsPtr -as $TOKEN_GROUPS
@@ -1036,10 +1036,10 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/aa379630(v=vs.85).aspx
1036
1036
1037
1037
# initial query to determine the necessary buffer size
1038
1038
$TokenPrivilegesPtrSize = 0
1039
- $Success = $Advapi32::GetTokenInformation($hProcToken , 3, 0, $TokenPrivilegesPtrSize, [ref]$TokenPrivilegesPtrSize)
1039
+ $Success = $Advapi32::GetTokenInformation($TokenHandle , 3, 0, $TokenPrivilegesPtrSize, [ref]$TokenPrivilegesPtrSize)
1040
1040
[IntPtr]$TokenPrivilegesPtr = [System.Runtime.InteropServices.Marshal]::AllocHGlobal($TokenPrivilegesPtrSize)
1041
1041
1042
- $Success = $Advapi32::GetTokenInformation($hProcToken , 3, $TokenPrivilegesPtr, $TokenPrivilegesPtrSize, [ref]$TokenPrivilegesPtrSize);$LastError = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
1042
+ $Success = $Advapi32::GetTokenInformation($TokenHandle , 3, $TokenPrivilegesPtr, $TokenPrivilegesPtrSize, [ref]$TokenPrivilegesPtrSize);$LastError = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
1043
1043
1044
1044
if ($Success) {
1045
1045
$TokenPrivileges = $TokenPrivilegesPtr -as $TOKEN_PRIVILEGES
0 commit comments