Microsoft Windows CE 3.0  

IDirectSoundCaptureBuffer::GetFormat

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The IDirectSoundCaptureBuffer::GetFormatmethod retrieves the current format of the capture buffer.

HRESULT GetFormat(
LPWAVEFORMATEX
lpwfxFormat
,
DWORD
dwSizeAllocated
,
LPDWORD
lpdwSizeWritten
);

Parameters

lpwfxFormat
Address of the WAVEFORMATEXvariable to contain a description of the sound data in the capture buffer. To retrieve the buffer size needed to contain the format description, specify NULL. In this case the DWORDpointed to by the lpdwSizeWrittenparameter will receive the size of the structure needed to receive complete format information.
dwSizeAllocated
Size, in bytes, of the WAVEFORMATEXstructure. DirectSoundCapture writes, at most, dwSizeAllocatedbytes to the structure; if the structure requires more memory, it is truncated.
lpdwSizeWritten
Address of a variable to receive the number of bytes written to the WAVEFORMATEXstructure. This parameter can be NULL.

Return Values

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be DSERR_INVALIDPARAM.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. dsound.h   dsound.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.