Description
Callback function for processing a PnP IRP. It must either complete that IRP or, optionally register an IoCompletion routine, and pass that IRP to the next lower driver before returning to BFF. See also BFF_INITIALIZATION_DATA / PBFF_INITIALIZATION_DATA.
Example#1:
NTSTATUS callback1(WDFOBJECT BffDevice, PIRP Irp)
{
...
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return status;
}
Example#2:
NTSTATUS callback2(WDFOBJECT BffDevice, PIRP Irp)
{
...
IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(BffDeviceWdmGetAttachedDevice(BffDevice), Irp);
...
return status;
}
Example#3:
NTSTATUS callback3(WDFOBJECT BffDevice, PIRP Irp)
{
...
IoCopyCurrentIrpStackLocationToNext(Irp);
IoSetCompletionRoutine(Irp, IoCompletion, BffDevice, ...);
status = IoCallDriver(BffDeviceWdmGetAttachedDevice(BffDevice), Irp);
...
return status;
}
Declarations
typedef NTSTATUS BFF_DISPATCH_PNP(WDFOBJECT BffDevice, PIRP Irp); typedef BFF_DISPATCH_PNP *PBFF_DISPATCH_PNP;
Parameters
| BffDevice | The WDF object as a bus filter device object. |
| Irp | The PnP I/O request packet. |
Return value
Zero or any positive value for success, otherwise for failure.
No comments:
Post a Comment