Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 5.48 KB

nf-spbcx-spbcontrollersetioothercallback.md

File metadata and controls

92 lines (63 loc) · 5.48 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:spbcx.SpbControllerSetIoOtherCallback
SpbControllerSetIoOtherCallback function (spbcx.h)
The SpbControllerSetIoOtherCallback method registers an SPB controller driver's EvtSpbControllerIoOther callback function.
spb\spbcontrollersetioothercallback.htm
SPB
04/30/2018
SpbControllerSetIoOtherCallback function
SPB.spbcontrollersetioothercallback, SpbControllerSetIoOtherCallback, SpbControllerSetIoOtherCallback method [Buses], spbcx/SpbControllerSetIoOtherCallback
spbcx.h
Universal
Available starting with Windows 8.
Spbcxstubs.lib
PASSIVE_LEVEL
Windows
SpbControllerSetIoOtherCallback
spbcx/SpbControllerSetIoOtherCallback
APIRef
kbSyntax
LibDef
spbcxstubs.lib
spbcxstubs.dll
SpbControllerSetIoOtherCallback

SpbControllerSetIoOtherCallback function

-description

The SpbControllerSetIoOtherCallback method registers an SPB controller driver's EvtSpbControllerIoOther callback function.

-parameters

-param FxDevice [in]

A WDFDEVICE handle to the device object that represents the SPB controller.

-param EvtSpbControllerIoOther [in]

A pointer to an EvtSpbControllerIoOther callback function. The SPB controller driver implements this function. The SPB framework extension (SpbCx) calls this function to pass an I/O control request to the controller driver. For more information about the type of I/O requests that are passed to this function, see the following Remarks section.

-param EvtIoInCallerContext [in, optional]

A pointer to an EvtIoInCallerContext callback function that is called when an I/O control request first arrives at the controller's I/O queue, and the request contains an IOCTL code that the SPB framework extension (SpbCx) does not recognize. This callback runs in the process context of the request originator, and can preprocess requests that will later be processed by the EvtSpbControllerIoOther callback. This parameter is optional and can be specified as NULL if no such preprocessing is required. For more information, see the following Remarks section.

-remarks

This method provides a way for your SPB controller driver to declare its support for custom I/O control codes (IOCTLs) that are bus-specific or driver-specific. If the SPB controller driver does not call this method, SpbCx rejects all such I/O control requests, and the SPB controller driver never sees them.

SpbCx manages the I/O queue for the SPB controller. By default, if SpbCx receives an I/O control request that has an IOCTL that it does not support, SpbCx completes the request with error status code STATUS_INVALID_DEVICE_REQUEST.

However, by calling SpbControllerSetIoOtherCallback, the SPB controller driver declares its support for I/O control requests that the SPB framework extension (SpbCx) does not support. In this case, when SpbCx receives an I/O control request that has an IOCTL code that it does not support, SpbCx calls the EvtSpbControllerIoOther function to pass the request to the SPB controller driver for processing. The SPB controller driver is responsible for completing the request.

For a list of the IOCTLs that SpbCx supports, see SpbCx I/O Control Codes.

The optional EvtIoInCallerContext callback function runs in the process context of the request originator, and can preprocess context-dependent request parameters, such as buffer pointers, before the request is passed to the EvtSpbControllerIoOther callback function. When the EvtIoInCallerContext function is called, any per-request context that the SPB controller driver requested in a previous call to SpbControllerSetRequestAttributes will already be allocated and assigned to the request.

The SPB controller driver must call this method before it commits the device object—that is, before it returns from the EvtDriverDeviceAdd callback or adds the PDO to the controller's child list. The child list represents the devices that are attached to the bus. For more information, see Enumerating the Devices on a Bus.

-see-also

EvtIoInCallerContext

EvtSpbControllerIoOther

SpbControllerSetRequestAttributes