|
Process Running Elevated?
Hi, i have and old app. developed in VC++ 6.0, can my app use this piece of
code to know if a process is elevated?
HANDLE hToken;
OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &hToken);
DWORD infoLen;
TOKEN_ELEVATION_TYPE elevationType;
GetTokenInformation(
hToken, TokenElevationType,
&elevationType, sizeof(elevationType), &infoLen)
|