PcDispatchIrp function (portcls.h)

The PcDispatchIrp function dispatches an IRP to the PortCls system driver's default handler.

Syntax

PORTCLASSAPI NTSTATUS PcDispatchIrp(
  [in] PDEVICE_OBJECT pDeviceObject,
  [in] PIRP           pIrp
);

Parameters

[in] pDeviceObject

Pointer to the device object. This parameter must point to a system structure of type DEVICE_OBJECT.

[in] pIrp

Pointer to the IRP that is to be dispatched

Return value

PcDispatchIrp returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.

Remarks

As part of its initialization process, the PcInitializeAdapterDriver function loads pointers to handlers for several IRPs into the driver object. Following the call to PcInitializeAdapterDriver, an adapter driver can choose to overwrite one or more of the PortCls handler pointers with pointers to its own IRP handlers.

If, after receiving an IRP, the adapter driver's IRP handler determines that the IRP should be handled by the PortCls IRP handler instead, the adapter driver's handler calls PcDispatchIrp to forward the IRP to the PortCls handler.

For a code example, see the SB16 sample audio driver in the Microsoft Windows Driver Kit (WDK).

Requirements

Requirement Value
Minimum supported client The PortCls system driver implements the PcDispatchIrp function in Microsoft Windows 98/Me and in Windows 2000 and later operating systems.
Target Platform Universal
Header portcls.h
Library Portcls.lib
IRQL PASSIVE_LEVEL

See also

DEVICE_OBJECT

IRP

PcInitializeAdapterDriver