DirectSoundCreate

HRESULT DirectSoundCreate(GUID FAR * lpGuid,

LPDIRECTSOUND * ppDS, IUnknown FAR * pUnkOuter);

Creates and initializes an IDirectSound interface.

·Returns DS_OK if successful, or one of the following error values otherwise:

DSERR_ALLOCATED

DSERR_INVALIDPARAM

DSERR_NOAGGREGATION

DSERR_NODRIVER

DSERR_OUTOFMEMORY

lpGuid

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 to request the default device.

ppDS

Address of a pointer to a DirectSound object created in response to this function.

pUnkOuter

Controlling unknown of the aggregate. Its value must be NULL.

The application must call the IDirectSound::SetCooperativeLevel method immediately after creating a DirectSound object.