Easy Win 32

 

Shutdown Functions

 

BOOL AdjustShutdownPrivileges();

As you know, for actual (Windows XP, NT, and others) there are some Security Privileges. This function adjust the Shutdown privileges.

It returns TRUE on success, otherwise it returns FALSE.

 

BOOL ShutdownComputer(UINT mode, DWORD reserved);

 

Automatically it calls AdjustShutdownPrivileges(), then it calls the API ExitWindowsEx(…).

It returns TRUE on success, otherwise it returns FALSE.