You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msg=bytes("Hello ProcMon from python with ctypes!", 'UTF-16')
handle=k32.CreateFileW(
PROCMON_DEBUGGER_HANDLER,
GENERIC_WRITE,
FILE_SHARE_WRITE,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0
)
ifhandle==-1: raiseRuntimeWarning("ProcMon doesn't appear to be running")
print ("Handle: %d"%handle)
k32.DeviceIoControl(
handle,
DW_IO_CONTROL_CODE,
msg,
len(msg) *2,
0,
0,
byref(c_void_p()), # So quoth the MSDN: If lpOverlapped is NULL, lpBytesReturned cannot be NULL. http://msdn.microsoft.com/en-us/library/windows/desktop/aa363216.aspx