Skip to content

Function_IRPMonDllHookDeviceByName

Martin Drab edited this page Mar 17, 2020 · 3 revisions

IRPMonDllHookDeviceByName function

Summary

Starts monitoring events related to a given device, identified by its object name.

Definition

void cdecl IRPMonDllHookDeviceByName(
    const long System.Char* DeviceName,
    const long System.Void** HookHandle,
    const long System.Void** ObjectId
   );

Parameters

DeviceName

Name of the device object to be monitored. It can be obtained from a snapshot of drivers and devices currently present in the system, retrieved by a call to the IRPMonDllSnapshotRetrieve function.

HookHandle

Address of variable that receives a handle representing the device being monitored.

ObjectId

Address of variable that receives globally unique ID of the target device object. This parameter is optional and can be NULL.

Return Value

| | Description ||---|---| | ERROR_SUCCESS | The operation has succeeded. The device is now being monitored. | | Other | An error occurred |

Remarks

Before a call to this routine, the driver to which the device belongs must be hooked. Otherwise, the function fails. Drivers can be hooked by a call to the IRPMonDllHookDriver routine.

See also

General

For Users-Developers

Tutorial

Public API

Functions

Types

Clone this wiki locally