dsh_Init

__stdcall dsh_Init(
LPGUID lpGuid,
HWND hwnd,
INT flags
);

Parameters

lpGuid
GUID that specifies the sound device. You can obtain this by DirectSoundEnumerate(). If you pass NULL, the standard device will be chosen.

hwnd
Specifies the main window of your application.

flags
You can specify additional flags here (you can pass 0 for standard behavior, too):
DSH_SHOWDIALOG: Not implemented. Uses standard device.
DSH_CHOOSEDEVICE: Not implemented. Uses standard device.
DSH_NOTEXCLUSIVE: Normal cooperative level will be set. If you donīt specify this flag, the exclusive mode will be set.


Return Values

Returns DSHRES_OK if successful. Other return values are DSHRES_CANTCREATEDS, DSHRES_CANTSETCOOP and DSHRES_CANTCREATEBUFFER.

Remarks

Currently you have to create an own enumeration function if you donīt want to use the standard device.

See also

dsh_Unload