The Init method initializes the port driver.
NTSTATUS
Init(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PUNKNOWN UnknownMiniport,
IN PUNKNOWN UnknownAdapter OPTIONAL,
IN PRESOURCELIST ResourceList
);
Init returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
Declared in portcls.h. Include portcls.h.
The miniport object specified by UnknownMiniport must support the miniport interface that the port driver requires or the Init call will fail.
During the IPort::Init call, the port driver calls the miniport driver's initialization method (for example, see IMiniportWavePci::Init).
Parameter UnknownAdapter points to the COM interface of an adapter object. The adapter driver typically creates this object within its device-startup routine, which is the routine that the operating system calls to start the device (see Startup Sequence). For an example of an interface for an adapter object, see the definition and implementation of the IAdapterObject interface in the sb16 and msvad sample audio adapters in the Windows DDK.
The UnknownMiniport, UnknownAdapter, and ResourceList parameters follow the reference-counting conventions for COM objects.
Callers of Init must run at IRQL PASSIVE_LEVEL.