Index   Commented   Search   About

mciSendCommand

The mciSendCommand function sends a command message to the specified MCI device.

MCIERROR mciSendCommand(

MCIDEVICEID IDDevice,

UINT uMsg,

DWORD fdwCommand,

DWORD dwParam

);

Parameters

IDDevice

Device identifier of the MCI device that is to receive the command message. This parameter is not used with the MCI_OPEN command message.

uMsg

Command message. For information about command messages, see Command Messages.

fdwCommand

Flags for the command message.

dwParam

Address of a structure that contains parameters for the command message.

Return Values

Returns zero if successful or an error otherwise. The low-order word of the returned doubleword 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 Constants: MCIERR Return Values.

To retrieve a text description of mciSendCommand return values, pass the return value to the mciGetErrorString function.

Remarks

Error values that are returned when a device is being opened are listed with the MCI_OPEN command message. In addition to the MCI_OPEN error return values, this function can return the values listed in Constants: MCIERR Return Values.

Use MCI_OPEN to obtain the device identifier specified by the IDDevice parameter.

See Also

MCI_OPEN
, mciGetErrorString

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun