This method initializes the DirectSound object that was created by using the CoCreateInstance function.
HRESULT Initialize( LPGUID lpGuid );
- Address of the globally unique identifier (GUID) specifying the sound driver to which this DirectSound object binds. Pass NULL to select the primary sound driver.
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be one of the following error values:
This method is provided for compliance with the Component Object Model (COM) protocol. If the DirectSoundCreate function was used to create the DirectSound object, this method returns DSERR_ALREADYINITIALIZED. If IDirectSound::Initialize is not called when using CoCreateInstance to create the DirectSound object, any method called afterward returns DSERR_UNINITIALIZED.
On Windows CE, CoCreateInstance cannot be use to create the DirectSound object on CE. DirectSoundCreate should be used instead. This method always returns DSERR_ALREADY_INITIALIZED.
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Link Library: Dsound.lib.
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.