Function_IRPMonDllOpenHookedDevice - MartinDrab/IRPMon GitHub Wiki
IRPMonDllOpenHookedDevice function
Summary
Open a handle to a given device monitored by the IRPMon driver.
Definition
void cdecl IRPMonDllOpenHookedDevice(
System.Void* ObjectId,
System.Void** Handle
);
Parameters
ObjectId
ID of the target device. IDs can be obtained from the 'ObjectId' member of the HOOKED_DEVICE_UMINFO structure retrieved by the IRPMonDllDriverHooksEnumerate function.
Handle
Address of variable that receives the newly opened handle. The handle can be then used to control the hooked device.
Return Value
Value | Description |
---|---|
ERROR_SUCCESS | The handle has been successfully created. |
Other | An error occurred |
Remarks
When no longer needed, the handle should be closed via the IRPMonDllCloseHookedDeviceHandle function. Alternatively, the IRPMonDllUnhookDevice routine may also be used to close the handle, however, it also unhooks the device represented by the handle.
See also
- HOOKED_DEVICE_UMINFO
- IRPMonDllCloseHookedDeviceHandle
- IRPMonDllDriverHooksEnumerate
- IRPMonDllUnhookDevice
Requirements
Header | irpmondll.h |
Library | irpmondll.lib |
DLL | irpmondll.dll |