Mercurial > trustbridge
changeset 262:759a898990d1
Use DWORD value directly to dertermine elevation
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 01 Apr 2014 15:01:38 +0000 |
parents | 7707191ddb01 |
children | daad3431b930 |
files | cinst/windowsstore.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cinst/windowsstore.c Tue Apr 01 16:32:35 2014 +0200 +++ b/cinst/windowsstore.c Tue Apr 01 15:01:38 2014 +0000 @@ -165,12 +165,12 @@ bool ret = false; if (OpenProcessToken (GetCurrentProcess(), TOKEN_QUERY, &hToken)) { - TOKEN_ELEVATION elevation; - DWORD cbSize = sizeof (TOKEN_ELEVATION); + DWORD elevation; + DWORD cbSize = sizeof (DWORD); if (GetTokenInformation (hToken, TokenElevation, &elevation, sizeof (TokenElevation), &cbSize)) { - ret = elevation.TokenIsElevated; + ret = elevation; } } if (hToken)