Microsoft DirectX 9.0

IDirectSound8::Initialize

The Initialize method initializes a device object that was created by using the CoCreateInstance function.

Syntax

HRESULT Initialize(
  LPCGUID pcGuidDevice 
);

Parameters

pcGuidDevice

Address of the globally unique identifier (GUID) specifying the sound driver to which this device object binds. Pass NULL to select the primary sound driver.

Return Values

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_ALREADYINITIALIZED
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_NODRIVER

Remarks

This method is provided for compliance with the Component Object Model (COM) protocol. If the DirectSoundCreate8 function was used to create the device object, this method returns DSERR_ALREADYINITIALIZED. If IDirectSound8::Initialize is not called when using CoCreateInstance to create the device object, any method called afterward returns DSERR_UNINITIALIZED.

Requirements

  Header: Declared in dsound.h.

See Also