Previous Next

IMiniportDMus::Init

The Init method initializes the DMus miniport object.

HRESULT
  Init(
    IN PUNKNOWN  pUnknownAdapter,
    IN PRESOURCELIST  pResourceList,
    IN PPORTDMUS  pPort
    OUT PSERVICEGROUP  *ppServiceGroup,
    );

Parameters

pUnknownAdapter
Pointer to the IUnknown interface of the adapter object whose miniport object is being initialized. This parameter is optional and can be specified as NULL. See the following Comments section.
pResourceList
Pointer to an IResourceList object that contains the adapter's resource list. After passing this reference to the miniport driver, the port driver is free to examine the contents of the resource list but will not modify the contents of this list.
pPort
Pointer to an IPortDMus object that provides the port driver's callback interface.
ppServiceGroup
Output pointer for the service group. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the IServiceGroup interface of the miniport driver's service-group object. This is the service group that this miniport driver wants to have used for calls to IPortDMus::Notify.

Return Value

Init returns S_OK if the call was successful. Otherwise, the method returns an appropriate error code.

Headers

Declared in dmusicks.h. Include dmusicks.h.

Comments

The pUnknownAdapter parameter is optional:

In either case, the Init method and calls the RegisterServiceRoutine method on the IInterruptSync object in order to add the miniport driver's ISR (interrupt-service routine) to the list of interrupt-sync routines. When the adapter driver later frees the port object, the port driver releases its reference to the IInterruptSync object.

The pUnknownAdapter and pResourceList parameters are the same pointer values that the adapter driver earlier passed as parameters to the IPortDMus object's Init method (see IPort::Init).

The pUnknownAdapter, pResourceList, pPort, and ppServiceGroup parameters follow the reference-counting conventions for COM objects.

The Init method is called at IRQL PASSIVE_LEVEL.

See Also

IResourceList, IPortDMus, IServiceGroup, IPortDMus::Notify