Microsoft DirectX 8.0 (C++)

DirectSoundCaptureCreate8

Creates and initializes an object that supports the IDirectSoundCapture8 interface.

This function creates an object that supports capture effects. Although the older DirectSoundCaptureCreate function can also be used to obtain the IDirectSoundCapture8 interface, the object created by that function cannot be used to create capture buffers that support the IDirectSoundCaptureBuffer8 interface.

HRESULT WINAPI DirectSoundCaptureCreate8(
  LPCGUID lpcGUID,
  LPDIRECTSOUNDCAPTURE8 *lplpDSC,
  LPUNKNOWN pUnkOuter
);

Parameters

lpcGUID
Address of the GUID that identifies the sound capture device. The value of this parameter must be one of the GUIDs returned by DirectSoundCaptureEnumerate, NULL for the default device, or one of the following values:
DSDEVID_DefaultCapture
System-wide default audio capture device.
DSDEVID_DefaultVoiceCapture
Default voice capture device.
lplpDSC
Address of a variable to receive an IDirectSoundCapture8 interface pointer.
pUnkOuter
Address of the controlling object's IUnknown interface for COM aggregation. Must be NULL, because aggregation is not supported.

Return Values

If the function succeeds, the return value is DS_OK.

If the function fails, the return value may be one of the following error values:

DSERR_ALLOCATED
DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_OUTOFMEMORY

Remarks

On sound cards that do not support full duplex, this method will fail and return DSERR_ALLOCATED.

Requirements

  Header: Declared in dsound.h.
  Import Library: Use dsound.lib.