Multimedia Device Information (INF) Files

IHVs who develop a multimedia hardware device for Windows 95 must provide a device information file (.INF) file on the device driver installation diskette for the device. There are two DDK sample INF files for multimedia hardware devices that you can use as models for your INF file. They are located in the directory \DDK\MMEDIA\SAMPLES\INF. The sample INF files are:

These sample INF files are both relatively straightforward. The DDK chapter "Device Information Files" in the Plug and Play section of the Windows 95 DDK documentation gives you enough information to interpret the sample INF files and make any necessary changes to fit your device. The following topics give information specific to multimedia hardware device INF files that is not found in the "Device Information Files" chapter. Information about INF files for multimedia software components will be provided in a future release of the Windows 95 DDK documentation.

Multimedia Device Hardware Class

Hardware multimedia devices, of which MIDI and waveform-audio devices are two examples, are all members of the MEDIA class of devices for Windows 95. In the [Version] section of the INF file for your device, you should use the following key:


Class = MEDIA

Multimedia Device Class Registration

Every INF file should contain a device-class registration section, because a particular Windows 95 user may have never previously installed a device of that class on their Windows 95 machine. (For more information, see the topic "ClassInstall Section" in the "Device Information Files" chapter.)

For example, in the sample MIDI.INF file, the ClassInstall section and sections associated with it contain the following lines:


[ClassInstall]
AddReg=MidiReg

[MidiReg]
HKR,,,,%MediaClassName%
HKR,,Icon,,1
. . .
[Strings]
MediaClassName="Media Devices"

The sample WAVE.INF file contains a ClassInstall section and associated sections with lines that are shown below:


[ClassInstall]
AddReg=Class.AddReg

[Class.AddReg]
HKR,,,,%MediaClassName%
HKR,,Icon,,1
. . .
[Strings]
MediaClassName="Media Devices"

These INF file sections from both the MIDI.INF and WAVE.INF sample INF files register a descriptive string for a MEDIA class device: "Media Devices." All multimedia hardware device INF files must register this same descriptive string, "Media Devices," in this way. This descriptive string is displayed by Windows 95 in the user interface to describe the group of all MEDIA class devices.

Note that the descriptive string itself ("Media Devices") is in the [Strings] section of the INF file along with other displayable strings. Putting all displayable strings in one section of an INF file makes it easier for translators to locate the words and phrases they have to translate for world markets.

Device Loader for Windows 95 Multimedia Devices

All multimedia device drivers must be loaded by the Windows 95 device loader MMDEVLDR.VXD, which establishes the device driver(s) in Ring 3, as described earlier in this chapter. All of the sample multimedia INF files have the following line in the section that adds the device to the registry:


HKR,,DevLoader,,mmdevldr.vxd

For example, in the MIDI.INF sample file, such a line is found in both the [MPU401.AddReg] and [ADLIB.addreg] sections. Your INF file must use the same line in the comparable section that adds your device to the registry.

Internal/External Switch for MIDI Devices

For MIDI devices, one statement type that can be used in an INF file is not documented in the "Device Information Files" chapter. (For multimedia hardware devices other than MIDI devices, there are no INF file statement types other than those documented in the "Device Information Files" chapter; no special switches have to be set for non-MIDI devices.)

If your MIDI device drives a synthesizer that is not on the device, include a statement that sets an "External" switch in the Drivers key of the registry for your device by using an INF file statement of the form:


HKR,Drivers\midi\msmpu401.drv,External,1,01,00,00,00

Following is an example of such a statement, in the context of the entire section that puts values into the Drivers key for the device (note that this example section is not taken from the sample MIDI.INF file).


[MPU401.AddReg]
HKR,,Driver,,msmpu401.vxd
HKR,Drivers\midi\msmpu401.drv,Driver,,msmpu401.drv
; following is the statement to use for external synthesizer
HKR,Drivers\midi\msmpu401.drv,External,1,01,00,00,00
HKR,Drivers,SubClasses,,"midi"