Microsoft Windows CE 3.0  

IDsDriverBuffer::Lock

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 IDsDriverBuffer::Lockmethod is called to obtain a valid write pointer to the sound buffer's audio data.

HRESULT Lock(
LPLPVOID
ppvAudio1
,
LPDWORD
pdwLen1
,
LPLPVOID
ppvAudio2
,
LPDWORD
pdwLen2
,
DWORD
dwWritePosition
,
DWORD
dwWriteLen
,
DWORD
dwFlags
);

Parameters

ppvAudio1
Pointer to a value that the driver must fill in with a pointer to the first block of sound data.
pdwLen1
Pointer to a doubleword that the driver must fill in with the number of bytes pointed to by *ppvAudio1.
ppvAudio2
Pointer to a value that the driver must fill in with a pointer to the second block of sound data. If the first block (pointed to by *ppvAudio1) points to the entire block of requested data, this value should be set to NULL.
pdwLen2
Pointer to a doubleword that the driver must fill in with the number of bytes pointed to by *ppvAudio2. If *ppvAudio2is NULL, this value must be set to zero.
dwWritePosition
The position relative to the start of the buffer that should be locked, and therefore subject to change by the locking application.
dwWriteLen
The number of bytes relative to the write position that will be locked, and therefore subject to change by the locking application.
dwFlags
No flags are currently defined. This value will always be 0.

Return Values

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