The MCIWNDM_GETERROR message retrieves the last MCI error encountered. You can send this message explicitly or by using the MCIWndGetError macro.
MCIWNDM_GETERROR
wParam = (WPARAM) (UINT) len;
lParam = (LPARAM) (LPVOID) lp;
Returns the integer error value if successful.
If lp is a valid pointer, a null-terminated string corresponding to the error is returned in its buffer. If the error string is longer than the buffer, MCIWnd truncates it.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in vfw.h.
Unicode: Defined as Unicode and ANSI messages.
MCIWnd Window Class Overview, MCIWnd Messages, MCIWndGetError