The IDirectSound::Initialize method initializes the DirectSound object that was created by using the CoCreateInstance function.
HRESULT Initialize(
LPGUID lpGuid
);
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:
DSERR_ALREADYINITIALIZED |
DSERR_GENERIC |
DSERR_INVALIDPARAM |
DSERR_NODRIVER |
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.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dsound.h.
Import Library: Use dsound.lib.