From MSDN...*SHUDDER*...
The calling process must have the SE_SHUTDOWN_NAME privilege. To enable the SE_SHUTDOWN_NAME privilege, use the AdjustTokenPrivileges function. For more information, see Changing Privileges in a Token.
...I haven't a clue what that means exactly, but have fun. ;o)