The PcInitializeAdapterDriver function binds an adapter driver to the PortCls system driver. IRP handlers and handlers for device addition and removal are installed in the driver object. Adapter drivers that need to bind to more than one class driver should not call this function.
NTSTATUS PcInitializeAdapterDriver( _In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPathName, _In_ PDRIVER_ADD_DEVICE AddDevice );
Specifies the registry path name that is to be passed as a parameter to the adapter's DriverEntry function.
Pointer to the adapter's AddDevice function. This is a pointer of type PDRIVER_ADD_DEVICE, which is defined in ntddk.h to be:
NTSTATUS (*PDRIVER_ADD_DEVICE)( IN struct _DRIVER_OBJECT *DriverObject, IN struct _DEVICE_OBJECT *PhysicalDeviceObject );
PcInitializeAdapterDriver returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.
The PcInitializeAdapterDriver function loads pointers to handlers for the following IRPs into the driver object:
An adapter driver that overwrites one or more of the pointers above with a pointer to its own IRP handler can call PcDispatchIrp from within its handler routine in order to forward the IRP to PortCls. For a code example, see the SB16 sample audio driver in the Microsoft Windows Driver Kit (WDK).
|Windows version||The PortCls system driver implements the PcInitializeAdapterDriver function in Microsoft Windows 98/Me and in Windows 2000 and later operating systems. The PortCls system driver implements the PcInitializeAdapterDriver function in Microsoft Windows 98/Me and in Windows 2000 and later operating systems.|
|Header||portcls.h (include Portcls.h)|