IMiniportDMus::Init method (dmusicks.h)

The Init method initializes the DMus miniport object.

Syntax

NTSTATUS Init(
  [in, optional] PUNKNOWN      UnknownAdapter,
  [in]           PRESOURCELIST ResourceList,
  [in]           PPORTDMUS     Port,
  [out]          PSERVICEGROUP *ServiceGroup
);

Parameters

[in, optional] UnknownAdapter

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. For more information, see the following Remarks section.

[in] ResourceList

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.

[in] Port

Pointer to an IPortDMus object that provides the port driver's callback interface.

[out] ServiceGroup

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.

Remarks

The pUnknownAdapter parameter is optional:

  • If pUnknownAdapter is non-NULL, the Init method queries the pUnknownAdapter object for its IInterruptSync interface.
  • If pUnknownAdapter is NULL, the Init method calls PcNewInterruptSync to create a new IInterruptSync object. In this case, the resource list that pResourceList points to supplies the interrupt resource that the new IInterruptSync object uses.
In either case, the Init method and calls the RegisterServiceRoutine method on the IInterruptSync object in order to add the miniport driver's interrupt service routine (ISR) to the list of ISRs. 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.

Requirements

Requirement Value
Target Platform Desktop
Header dmusicks.h (include Dmusicks.h)
IRQL PASSIVE_LEVEL

See also

IInterruptSync

IMiniportDMus

IPort::Init

IPortDMus

IPortDMus::Notify

IResourceList

IServiceGroup

PcNewInterruptSync