The information in this article applies to:
SYMPTOMSThe WaveOutOpen() and WaveInOpen() functions return an MMSYSERR_INVALPARAM error when using a window handle as a callback mechanism. CAUSEThe documentation for the WaveOutOpen() and WaveInOpen() functions specifies that the data type of the dwCallback parameter should be a DWORD. However, when the symbol STRICT is defined (using #define), HWND is no longer equated to UINT. Instead, it is a NEAR pointer. Therefore, simply casting a window handle to a DWORD fails when STRICT is defined. The following code illustrates the statement causing this error:
RESOLUTIONA simple workaround is to cast a window handle to UINT before casting it to a DWORD. For example:
MORE INFORMATION
STRICT is a macro which enhances type safety for Windows 3.1 applications.
If it is defined, several data types become distinct. For instance, HDC and
HWND become different types when STRICT is defined.
Additional query words: 2.00 3.10 wave audio invalid window
Keywords : |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |