The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
DirectSoundCreate8
The DirectSoundCreate8 function creates and initializes an object that supports the IDirectSound8 interface.
HRESULT DirectSoundCreate8(
LPCGUID lpcGuidDevice,
LPDIRECTSOUND8 * ppDS8,
LPUNKNOWN pUnkOuter
)
Parameters
- lpcGuidDevice
-
Address of the GUID that identifies the sound device. The value of this parameter must be one of the GUIDs returned by DirectSoundEnumerate, or NULL for the default device, or one of the following values.
Value Description DSDEVID_DefaultPlayback System-wide default audio playback device. Equivalent to NULL. DSDEVID_DefaultVoicePlayback Default voice playback device. - ppDS8
- Address of a variable to receive an IDirectSound8 interface pointer.
- pUnkOuter
- Address of the controlling object's IUnknown interface for COM aggregation. Must be NULL, because aggregation is not supported.
Return Value
If the function succeeds, it returns DS_OK. If it fails, the return value may be one of the following.
| Return Code |
|---|
| DSERR_ALLOCATED |
| DSERR_INVALIDPARAM |
| DSERR_NOAGGREGATION |
| DSERR_NODRIVER |
| DSERR_OUTOFMEMORY |
The application must call the IDirectSound8::SetCooperativeLevel method immediately after creating a device object.
Community Additions
Show: