Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following code sample shows the simplest form of sending an IRP down. In this case, the create vector does no allocation or initialization that might need to be undone if the drivers below fail the create IRP. Because there is no cleanup necessary, there is no failure path in this sample.
static NTSTATUS YourSubunit_CreateVector(PDEVICE_OBJECT devObj, PIRP Irp)
{
NTSTATUS status;
IoSkipCurrentIrpStackLocation (Irp);
//
// 'ParentDeviceObject', below, is the value returned from your call to
// IoAttachDeviceToDeviceStack().
//
status = IoCallDriver(ParentDeviceObject, Irp);
return(status);
}
Send Feedback on this topic to the authors