Skip to content

Function_IRPMonDllHookDeviceByName

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

IRPMonDllHookDeviceByName function

Summary

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

Definition

void cdecl IRPMonDllHookDeviceByName(
    System.Char* DeviceName,
    System.Void** HookHandle,
    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

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

Requirements

Header irpmondll.h
Library irpmondll.lib
DLL irpmondll.dll

General

For Users-Developers

Tutorial

Public API

Functions

Types

Clone this wiki locally