The GetDeviceID function retrieves the unique device identifier of the default playback and capture devices selected by the user in Control Panel.
HRESULT GetDeviceID( LPCGUID pGuidSrc, LPGUID pGuidDest );
Value | Description |
---|---|
DSDEVID_DefaultPlayback | System-wide default audio playback device. |
DSDEVID_DefaultCapture | System-wide default audio capture device. |
DSDEVID_DefaultVoicePlayback | Default voice playback device. |
DSDEVID_DefaultVoiceCapture | Default voice capture device. |
If the function succeeds, it returns DS_OK. If it fails, the return value may be DSERR_INVALIDPARAM.
If pGuidSrc points to a valid device identifier, the same value is returned in pGuidDest. If pGuidSrc is one of the listed constants, pGuidDest returns the address of the corresponding device GUID.
Header: Declared in Dsound.h.
Import Library: Use Dsound.lib.