DWORD APIENTRY
widMessage (
UINT uDeviceId,
UINT uMsg,
DWORD dwUser,
DWORD dwParam1,
DWORD dwParam2
);
The widMessage function is one of the user-mode audio driver entry points. It the entry point for user-mode waveform input drivers.
The widMessage function returns a value that is dependent upon the message. If the received message is not recognized, the function returns MMSYSERR_NOTSUPPORTED.
You can use dwUser in any manner you wish. Drivers that can support multiple clients return a different value for each WIDM_OPEN message, in order to keep track of which subsequent messages are being sent by which client.