|
MCI Functions, Macros, and Messages
Most MCI applications use the mciSendString and mciSendCommand functions dozens of times. MCI provides some other useful functions that your
application will use less frequently.
The device identifier required by most MCI commands is typically retrieved in
a call to the open (MCI_OPEN) command. If you need a device identifier but do not want to open the device for example, if you want to query the capabilities of the device before
taking any other action you can call the mciGetDeviceID function.
The mciGetCreatorTask function allows your application to use a device identifier to retrieve a
handle to the task that created that identifier.
You can use the mciGetYieldProc and mciSetYieldProc functions to assign and retrieve the address of the callback function
associated with the "wait" (MCI_WAIT) flag.
The mciGetErrorString function retrieves a string that describes an MCI error value. Each string
that MCI returns, whether data or an error description, is a maximum of 128
characters. Dialog box fields that are smaller than 128 characters will truncate the
longer strings returned by MCI. For more information about these strings, see Constants: MCIERR Return Values.
The MCI macros are tools you can use to create and disassemble values that
specify time formats. These time formats are used in many MCI commands. The
formats acted on by the macros are hours/minutes/seconds (HMS),
minutes/seconds/frames (MSF), and tracks/minutes/seconds/frames (TMSF). The following table lists
the macros and their descriptions.
MCI also provides two messages: MM_MCINOTIFY and MM_MCISIGNAL. The MM_MCINOTIFY message notifies an application of the outcome of an MCI
command whenever that command specifies the "notify" (MCI_NOTIFY) flag. The
MM_MCISIGNAL message is specific to digital-video devices; it notifies the
application when a specified position is reached.
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
|