IMiniportDMus::Init method

The Init method initializes the DMus miniport object.


  [in, optional] PUNKNOWN      pUnknownAdapter,
  [in]           PRESOURCELIST pResourceList,
  [in]           PPORTDMUS     pPort,
  [out]          PSERVICEGROUP *ppServiceGroup


pUnknownAdapter [in, optional]

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.

pResourceList [in]

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 [in]

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

ppServiceGroup [out]

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.


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.


Target platform


Dmusicks.h (include Dmusicks.h)



See also




Send comments about this topic to Microsoft