Jump to content

MM MCIPASSDEVICE: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:MM_MCIPASSDEVICE}} This message notifies an application that the use of a device is being gained or lost. ==Syntax== <PRE> MsgParam1 USHORT usDeviceID; Device ID.: USHORT usReserved; Reserved.: MsgParam2 USHORT usEvent; Gaining or losing use of device.: USHORT usReserved; Reserved.: </PRE> ==Parameters== ;''usDeviceID'' (USHORT) - input :Device ID. ;''usReserved'' (USHORT) - input :Reserved. ;''usEvent'' (USHORT) - i..."
 
(No difference)

Latest revision as of 03:03, 26 November 2025

This message notifies an application that the use of a device is being gained or lost.

Syntax

MsgParam1
USHORT usDeviceID; /* Device ID. */
USHORT usReserved; /* Reserved. */

MsgParam2
USHORT usEvent;    /* Gaining or losing use of device. */
USHORT usReserved; /* Reserved. */

Parameters

usDeviceID (USHORT) - input
Device ID.
usReserved (USHORT) - input
Reserved.
usEvent (USHORT) - input
Indicates whether use of the device is being gained or lost:
  • MCI_GAINING_USE The device is being gained.
  • MCI_LOSING_USE The device is being lost.
usReserved (USHORT) - input
Reserved.

Returns

rc (BOOL) - return
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred. (Note: The return value is typically ignored for this posted message.)

Remarks

The window handle specified in the hwndCallback field of the structure passed with the MCI_OPEN command is used as the window handle for the MM_MCIPASSDEVICE messages.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set rc to the default value of FALSE.