/[NexusPowerControl]/trunk/NexusPowerCommand/win32api.cs
ViewVC logotype

Diff of /trunk/NexusPowerCommand/win32api.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/NexusPowerCommand/win32api.cs	2011/10/25 09:20:38	33
+++ trunk/NexusPowerCommand/win32api.cs	2011/10/25 09:24:35	34
@@ -24,6 +24,7 @@
 
             // You can't shutdown without security privileges
             mcWin32.Scope.Options.EnablePrivileges = true;
+            mcWin32.Scope.Options.Impersonation = ImpersonationLevel.Impersonate;
             ManagementBaseObject mboShutdownParams =
                      mcWin32.GetMethodParameters("Win32Shutdown");
 
@@ -44,8 +45,8 @@
         {
             internal enum WMIShutdownRebootFlags
             {
-                Shutdown = 0x0001,
-                Reboot = 0x0002,
+                Shutdown = 1,
+                Reboot = 2,
             }
             [Flags]
             internal enum ExitWindows : uint

 

  ViewVC Help
Powered by ViewVC 1.1.22