BUS_INTERFACE_SWENUM structure (swenum.h)

The BUS_INTERFACE_SWENUM structure describes the demand-load bus enumerator object's interface.

Syntax

typedef struct _BUS_INTERFACE_SWENUM {
  INTERFACE                  Interface;
  PFNREFERENCEDEVICEOBJECT   ReferenceDeviceObject;
  PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
  PFNQUERYREFERENCESTRING    QueryReferenceString;
} BUS_INTERFACE_SWENUM, *PBUS_INTERFACE_SWENUM;

Members

Interface

Specifies the exported INTERFACE.

ReferenceDeviceObject

Pointer to a driver-supplied KsReferenceSoftwareBusObject routine.

DereferenceDeviceObject

Pointer to a driver-supplied KsDereferenceSoftwareBusObject routine.

QueryReferenceString

Pointer to a driver-supplied KsQuerySoftwareBusInterface routine.

Remarks

A driver obtains a BUS_INTERFACE_SWENUM 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:

  • Allocate and zero-fill a BUS_INTERFACE_SWENUM structure from the paged memory pool.
  • Create an IRP for the query interface request and get the next stack location for the new IRP.
  • In the new stack location, provide a pointer to the new BUS_INTERFACE_SWENUM structure in the Parameters.QueryInterface.Interface member.
  • Set a completion routine and send the request down the driver stack.
  • If your request is successful, the system fills in the BUS_INTERFACE_SWENUM structure pointed to by Parameters.QueryInterface.Interface.

Requirements

Requirement Value
Header swenum.h (include Swenum.h)