10835 TOKEN_ELEVATION_TYPE e_ElevationType; |
10835 TOKEN_ELEVATION_TYPE e_ElevationType; |
10836 DWORD dw_TokenLength; |
10836 DWORD dw_TokenLength; |
10837 |
10837 |
10838 h_Process = GetCurrentProcess(); |
10838 h_Process = GetCurrentProcess(); |
10839 if (OpenProcessToken(h_Process,TOKEN_READ,&h_Token) == FALSE) { |
10839 if (OpenProcessToken(h_Process,TOKEN_READ,&h_Token) == FALSE) { |
10840 printf("Error: Couldn't open the process token\n"); |
10840 console_printf("Error: Couldn't open the process token\n"); |
10841 goto getOutOfHere; |
10841 goto getOutOfHere; |
10842 } |
10842 } |
10843 if (GetTokenInformation(h_Token,TokenElevation,&t_TokenElevation,sizeof(t_TokenElevation),&dw_TokenLength) == FALSE) { |
10843 if (GetTokenInformation(h_Token,TokenElevation,&t_TokenElevation,sizeof(t_TokenElevation),&dw_TokenLength) == FALSE) { |
10844 printf("Error: Couldn't retrieve the elevation right of the current process token\n"); |
10844 console_printf("Error: Couldn't retrieve the elevation right of the current process token\n"); |
10845 CloseHandle(h_Token); |
10845 CloseHandle(h_Token); |
10846 goto getOutOfHere; |
10846 goto getOutOfHere; |
10847 } |
10847 } |
10848 if (t_TokenElevation.TokenIsElevated != 0) { |
10848 if (t_TokenElevation.TokenIsElevated != 0) { |
10849 if (GetTokenInformation(h_Token,TokenElevationType,&e_ElevationType,sizeof(e_ElevationType),&dw_TokenLength) == FALSE) { |
10849 if (GetTokenInformation(h_Token,TokenElevationType,&e_ElevationType,sizeof(e_ElevationType),&dw_TokenLength) == FALSE) { |
10850 printf("Error: Couldn't retrieve the elevation token class\n"); |
10850 console_printf("Error: Couldn't retrieve the elevation token class\n"); |
10851 CloseHandle(h_Token); |
10851 CloseHandle(h_Token); |
10852 goto getOutOfHere; |
10852 goto getOutOfHere; |
10853 } else { |
10853 } else { |
10854 if (e_ElevationType == TokenElevationTypeFull || e_ElevationType == TokenElevationTypeDefault) { |
10854 if (e_ElevationType == TokenElevationTypeFull || e_ElevationType == TokenElevationTypeDefault) { |
10855 CloseHandle(h_Token); |
10855 CloseHandle(h_Token); |
17485 ! ! |
17485 ! ! |
17486 |
17486 |
17487 !Win32OperatingSystem class methodsFor:'documentation'! |
17487 !Win32OperatingSystem class methodsFor:'documentation'! |
17488 |
17488 |
17489 version |
17489 version |
17490 ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.487 2013-12-17 16:42:20 cg Exp $' |
17490 ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.488 2013-12-17 16:47:26 cg Exp $' |
17491 ! |
17491 ! |
17492 |
17492 |
17493 version_CVS |
17493 version_CVS |
17494 ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.487 2013-12-17 16:42:20 cg Exp $' |
17494 ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.488 2013-12-17 16:47:26 cg Exp $' |
17495 ! |
17495 ! |
17496 |
17496 |
17497 version_SVN |
17497 version_SVN |
17498 ^ '$Id: Win32OperatingSystem.st,v 1.487 2013-12-17 16:42:20 cg Exp $' |
17498 ^ '$Id: Win32OperatingSystem.st,v 1.488 2013-12-17 16:47:26 cg Exp $' |
17499 |
17499 |
17500 ! ! |
17500 ! ! |
17501 |
17501 |
17502 |
17502 |
17503 Win32OperatingSystem initialize! |
17503 Win32OperatingSystem initialize! |