diff cinst/windowsstore.c @ 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 3595ea4fd3fb
children 824ef90a6721
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)

http://wald.intevation.org/projects/trustbridge/