// ks.h
typedef struct {
INTERFACE Interface;
PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
PFNQUERYREFERENCESTRING QueryReferenceString;
} BUS_INTERFACE_REFERENCE, *PBUS_INTERFACE_REFERENCE;
View the official Windows Driver Kit DDI referenceNo description available.
A software device enumerator exports this interface to allow drivers to reference count physical device objects (PDOs) such that the device remains active while in use and is unloaded when not in use.
InterfaceSpecifies the exported INTERFACE.
ReferenceDeviceObjectPointer to a driver-supplied KStrReferenceDeviceObject routine.
DereferenceDeviceObjectPointer to a driver-supplied KStrDereferenceDeviceObject routine.
QueryReferenceStringPointer to a driver-supplied KStrQueryReferenceString routine.
A driver obtains a BUS_INTERFACE_REFERENCE interface by creating and sending an IRP_MJ_PNP request that specifies an IRP_MN_QUERY_INTERFACE minor function code. To do this, the driver should: