Shutting down windows using win32api

人言落日是天涯,望极天涯不见家 kelvin.you at gmail.com
Wed Apr 11 14:51:04 EDT 2007


On Apr 11, 7:49 pm, Tim Golden <m... at timgolden.me.uk> wrote:
> On a whim, given the terseness of your post, I
> cut-and-pasted your subject line into Google,
> added "python" for good measure, and looked at
> the results.
>
> I suggest you might do the same. Granted, maybe
> this will raise more questions, but at least it
> shows willing :)
>
> TJG

use ctypes module to execute the windows api.

Shutdown windows can use the follow api
BOOL ExitWindowsEx(
  UINT uFlags,
  DWORD dwReason
);
about the usage, u can refer to the microsoft msdn





More information about the Python-list mailing list