IN HANDLE DeviceInstanceHandle,
IN PUNICODE_STRING DeviceInstanceName,
IN OUT PVOID Context
This routine is a callback function for IopApplyFunctionToSubKeys.
It is called for each instance of a particular device (i.e., subkeys
under HKLM\System\Enum\\). Its purpose is to determine
whether a particular device instance matches the one specified in the
context structure. A match is determined by whether the device instance
has the same BaseDevicePath (i.e., parent device) and slot number as
the device instance being searched for.
NOTE: The PnP device-specific registry resource must be held for (at least)
shared (read) access before invoking this routine.
DeviceInstanceHandle - Supplies a handle to the current device instance.
DeviceInstanceName - Supplies the name of this device instance key.
Context - Supplies a pointer to a PI_FIND_DEVICE_INSTANCE_CONTEXT
structure with the following fields:
NTSTATUS ReturnStatus - Fill this in with the NT error status code
if an error occurs that aborts the search. This is assumed to
be initialized to STATUS_SUCCESS when this routine is called.
PUNICODE_STRING BusDeviceInstancePath - Supplies the registry path
(relative to HKLM\System\Enum) of the bus device instance where
the device being searched for is located.
ULONG SlotNumber - Supplies the bus slot number where the device
being searched for is located.
UNICODE_STRING DeviceInstanceKeyName - If the current device instance
matches the one being searched for, then this unicode string
is initialized with a copy the device instance key name.
NOTE: It is the caller's responsibility to free the (PagedPool) memory
allocated for the DeviceInstanceKeyName buffer.
TRUE to continue the enumeration.
FALSE to abort it. The routine should abort the search if it discovers the
matching device instance key.