BOOLEAN PiFindServiceInstance( IN HANDLE DeviceInstanceHandle, IN PUNICODE_STRING DeviceInstancePath, IN OUT PVOID Context ); Routine Description: This routine is a callback function for IopApplyFunctionToServiceInstances. It is called for each device instance key referenced by a service instance value under the specified service's volatile Enum subkey. The purpose of this routine is to determine whether the current device instance path matches the device instance being searched for (as specified in the context structure), and if so, to set the 'DeviceFound' flag in the context structure, and abort enumeration. NOTE: The PnP device-specific registry resource must be acquired for shared (read) access before invoking this routine. Arguments: DeviceInstanceHandle - Unused DeviceInstancePath - Supplies the registry path (relative to HKLM\System\Enum) to this device instance. Context - Supplies a pointer to a PI_FIND_SERVICE_INSTANCE_CONTEXT structure with the following fields: PUNICODE_STRING DeviceInstancePath - Supplies a pointer to a unicode string specifying the device instance being searched for. BOOLEAN DeviceFound - If the current device instance matches the one being searched for, then this flag is set to TRUE, and enumeration is aborted (by returning FALSE). Return Value: TRUE to continue the enumeration. FALSE to abort it. Enumeration should be aborted when the matching device instance is encountered.