For MCDs to look consistent to applications, error codes should be consistent across MCDs. Following are some guidelines for using common error codes.
┌────────────────────────────────────────┬──────────────────────────────┐ │Use this error message: │When this error condition │ │ │occurs: │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_OUTOFRANGE │The value given is out of │ │ │range. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_UNRECOGNIZED_COMMAND │Unknown usMessage value. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_INVALID_FLAG │Unknown ulParam1 value. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_INVALID_ITEM_FLAG │Unknown flag in ulItem field. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_INVALID_TIME_FORMAT_FLAG │Unknown flag in ulTimeFormat │ │ │field. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_SPEED_FORMAT_FLAG │Unknown flag in ulSpeedFormat │ │ │field. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_MISSING_PARAMETER │Invalid or NULL pParam2 field.│ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_INVALID_BUFFER │Invalid address to output │ │ │buffer in pParam2. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_MISSING_FLAG │Missing flags in ulParam1 when│ │ │one or more flags are │ │ │required. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_UNSUPPORTED_FLAG │Flag in ulParam1 is valid for │ │ │the message, but driver cannot│ │ │perform the task. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_UNSUPPORTED_FUNCTION │Function in usMessage is │ │ │understood by the device but │ │ │is not supported by the │ │ │driver. │ ├────────────────────────────────────────┼──────────────────────────────┤ │MCIERR_FLAGS_NOT_COMPATIBLE │More than one mutually │ │ │exclusive flag is set. │ └────────────────────────────────────────┴──────────────────────────────┘
The following error conditions are always handled by MDM: