The widMessage Entry Point for Waveform Input Drivers

A waveform input driver must have an entry-point function named widMessage to process messages sent by MMSYSTEM. The syntax of widMessage is as follows.

DWORD widMessage(uDeviceID, uMsg, dwUser, dwParam1, dwParam2)

The uDeviceID parameter is a UINT specifying an ID for the target device. Device IDs are sequential, starting at zero and ending at a value equal to one less than the number of devices the driver supports.

The uMsg parameter is a UINT specifying the message being sent to the driver. The driver should return MMSYSERR_NOTSUPPORTED if it does not support the specified message.

The dwUser parameter is a DWORD of instance information for use by the driver. The driver should fill this location with its instance data (for example, with a far pointer to a data structure). For any other messages, the instance data is returned to the driver.

The dwParam1 and dwParam2 parameters are message-dependent.

The low-order word of the return value specifies a message-dependent return value or error code. The high-order word should be zero.