MCI device driver provides Windows-based programs device with free or independent capabilities for controlling software of hardware of multimedia. It is very important file and responsible for performing task of the system because it connects devices to software and operating system. It provides the functionality for MCI commands and handles all activities of multimedia such as presentation, playback, recording etc.
It is designed to let individual drivers or reduce the command sets. Custom error strings are created by users according to their requirements such as if you want to give the indication error message according to your requirement then you can create the custom error. An application can use mciGetErrorSrting () to acquire or attain the String which is returned by MCI (Media Control Interface) in the Microsoft Windows graphics environment. Since its name suggests as Media Controller so it’s clear that it controls on multimedia activities. STRINGTABLE resources are used by MCI to store error strings. For each string, there is an identified constant correspond to the error returned by DriverProc which is a function. The returned value must be greater than or equal to constant MCIERR_CUSTOM_DRIVER_BASE because it avoids the confusion with the MCI error codes which are predefined. You can add Custom error String to an MCI Device Driver so that if any missing found then it looks in the Table String.
MCIPIONR.DRV is the LaserDisk device driver contains the given declaration in its header file named MCIPIONR.H-
#define MCIERR_PIONEER_ILLEGAL_FOR_CLV (MCIERR_CUSTOM_DRIVER_BASE)
#define MCIERR_PIONEER_NOT_SPINNING (MCIERR_CUSTOM_DRIVER_BASE+1)
#define MCIERR_PIONEER_NO_CHAPTERS (MCIERR_CUSTOM_DRIVER_BASE+2)
#define MCIERR_PIONEER_NO_TIMERS (MCIERR_CUSTOM_DRIVER_BASE+3)
When mciGetErrorString() receives a value greater than or equal to MCIERR_CUSTOM_DRIVER_BASE, it looks in the driver’s resource table for a string with the corresponding identifier.
The resource file, MCIPIONR.RC has the STRINGTABLE definition which is also given below-
MCIERR_PIONEER_ILLEGAL_FOR_CLV, “Illegal operation for CLV type disc.”
MCIERR_PIONEER_NOT_SPINNING, “The disc must be spun up to perform this \ operation.”
MCIERR_PIONEER_NO_CHAPTERS, “Chapters are not supported for this disc.”
MCIERR_PIONEER_NO_TIMERS, “All timers are in use. Cannot enable \ notification.”
The importance of MCI Device Driver:-
There is more importance of MCI device driver because it handles the activities of multimedia devices such as its presentation, recording, playback and also used to add custom error string with STRINGTABLE resources. If mciGetErrorSrting () gets a value which is equal to or greater than MCIERR_CUSTOM_DRIVER_BASE then it’s it noticed in the driver resources table.