BUG: WAVEHDR.dwBytesRecorded Set to Zero in Win32s

Last reviewed: February 27, 1996
Article ID: Q147430
The information in this article applies to:
  • Microsoft Win32s version 1.3

SYMPTOMS

When you are using the Multimedia low-level Wave input functions in Win32s for recording purposes, the dwBytesRecorded member of the WAVEHDR structure is set to zero when you handle the MM_WIM_DATA message.

CAUSE

Win32s does not copy the dwBytesRecorded member as it should when handling the MM_WIM_DATA message.

RESOLUTION

You will have to call waveInUnprepareHeader() before you examine the dwBytesRecorded member in the WAVEHDR structure when you are handling the MM_WIM_DATA message. Then you will get the correct result.

Note that the dwBytesRecorded value will be non-zero when you handle the MM_WIM_DATA message the second time or later. This non-zero value is still incorrect as it corresponds to the value of the dwBytesRecored from the previous attempt. Therefore, you should always call waveInUnprepareHeader() to get the correct result from dwBytesRecorded member in the MM_WIM_DATA message. This means you will need to call waveInPrepareHeader() again if recording is continued and the buffer is sent back to the driver.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 1.30 win32s winmm low level wave
KBCategory: kbmm kbbuglist
KBSubcategory: w32s


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 27, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.