WinMMMciSendCommand(Int32, MCICommands, IntPtr, IntPtr) Method

Sends a command message to the specified MCI device.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("WinMM.dll", EntryPoint = "mciSendCommand", SetLastError = true)]
public static int MciSendCommand(
	int device,
	MCICommands command,
	IntPtr flags,
	ref IntPtr refParam
)

Parameters

device  Int32
Device identifier of the MCI device that is to receive the command message.

This parameter is not used with the Open command message.

command  MCICommands
The command message to send.
flags  IntPtr
Flags for the command message.
refParam  IntPtr
Pointer to a structure that contains parameters for the command message.

Return Value

Int32
Returns zero if successful or an error otherwise. The low-order word of the returned DWORD value contains the error return value.

If the error is device-specific, the high-order word of the return value is the driver identifier; otherwise, the high-order word is zero. For a list of possible return values, see MCIERR Return Values.

To retrieve a text description of return values, pass the return value to the MciGetErrorString(Int32, StringBuilder, Int32) function

Remarks

See Also