MCDs should attempt to use the MCIERR return codes wherever possible. These
return codes are provided in the C header file MEERROR.H. Error codes from
SPI, MMIO or the operating system should be mapped into MCIERR return codes
when it makes sense. If the driver has unique return codes for certain
conditions, it can use error numbers MCIERR_CUSTOM_DRIVER_BASE through MEBASE-1.
If custom driver return codes are used, a custom driver error table should
be created.
MCDs should use the following return types in the high-order word of the
return code when the media message has a return field.
Return Type
MCI_INTEGER_RETURNED
Convert the given binary integer to its unsigned
ASCII string representation.
MCI_COLONIZED2_RETURN
Convert the binary integer to the following form:
byte0:byte2
MCI_COLONIZED3_RETURN
Convert
the binary integer to the following form:
byte0:byte1:byte2
MCI_COLONIZED4_RETURN
Convert
the binary integer to the following form:
byte0:byte1:byte2:byte4
MCI_TRUE_FALSE_RETURN
Convert
the TRUE/FALSE value to the string representation.
MCI_ON_OFF_RETURN
Convert the ON/OFF value to the string representation.
MCI_DEVICENAME_RETURN
Convert
the device type integer to its device name string.
MCI_TIME_FORMAT_RETURN
Convert the time format integer to its appropriate
string.
MCI_SPEED_FORMAT_RETURN
Convert
the speed format integer to its appropriate string.
MCI_MEDIA_TYPE_RETURN
Convert the disc type integer for a videodisc to
"CLV," "CAV," "OTHER".
MCI_TRACK_TYPE_RETURN
Convert
the track type integer to "AUDIO," "DATA," "OTHER".
MCI_CONNECTOR_TYPE_RETURN
Convert the connector type integer to its appropriate
string.
MCI_CDXA_CHANNEL_ DESTINATION_RETURN
Convert
the CDXA channel destination type integer to its appropriate string.
MCI_PREROLL_TYPE_RETURN
Convert the preroll type integer to its appropriate
string.
MCI_FORMAT_TAG_RETURN
Convert
the format tag type integer to its appropriate string.
MCI_SIGNED_INTEGER_RETURN
Convert the given binary integer to its signed ASCII
string representation.
The return types described in the previous list allow the string parser
to convert binary return values into strings. This conversion takes place
only when the application calls mciSendString and only if no error occurs
on the call. For example: "capability cdaudio has video" returns FALSE
in the return string field of mciSendString. The media driver for the CD
audio MCD puts a zero in the ulReturn field of the MCI_GETDEVCAPS_PARMS
structure and MCI_TRUE_FALSE_RETURN in the high-order word of the return
code.
[Back]
[Next]