Is it possible to call the ShutdownBlockReasonCreate
, ShutdownBlockReasonDestroy
, and ShutdownBlockReasonQuery
win32 APIs from within Python? I can't find them anywhere in the pywin32
library.
Thanks!
Use ctypes
from ctypes import *
retval = windll.user32.ShutdownBlockReasonCreate(
handle,
c_wchar_p("the reason")
)
if retval != 0:
... Error checking
And similarly with ShutdownBlockReasonDestroy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With