Please refer to "Device Information Files," elsewhere in the Windows 95 DDK, for details regarding general .INF structure. The following topics contain samples for a multimedia single function PCMCIA card, with a description of multimedia-specific entries.
For all multimedia devices, the Class entry in the [Version] section of the .INF file must be set to MEDIA. This associates the device with the multimedia class installer, which provides the necessary interfaces to the multimedia control panel and multimedia subsystem.
[Version] Signature="$CHICAGO$" Class=MEDIA provider=%NMCMfgName%
The [Manufacturer] section specifies the manufacturer name and section name for the manufacturer's device(s). In the following example, the string "New Media Corporation" is associated with the [NewMediaCorp] section and contains a single PCMCIA device descriptor.
[Manufacturer] %NMCMfgName%=NewMediaCorp [NewMediaCorp] %PCMCIA\New_Media_Corporation-.WAVjammer-6B54.DeviceDesc%=PNPB007_Device,PCMCIA\New_Media_Corporation-.WAVjammer-6B54
In the section above, the device identifier string "PCMCIA\New_Media_Corporation-.WAVjammer-6B54" is assigned to the [PNPB007_Device] section. The device description that is visible to the user is the string referred to by the identifier %PCMCIA\New_Media_Corporation-.WAVjammer-6B54.DeviceDesc%.
The device section [PNPB007_Device] describes the files to delete and copy, the strings to remove from SYSTEM.INI, and the sections to add to the registry.
[PNPB007_Device] DelFiles=WSS.DelList CopyFiles=WSS.CopyList AddReg=WAVE.AddReg, MIXER.AddReg, PNPB007.AddReg, WSS.AddReg UpdateInis=WSS.UpdateInis [WSS.UpdateInis] system.ini,386Enh,"device=vsndsys.386" system.ini,drivers,"wave*=sndsys.drv",,1 system.ini,drivers,"midi*=sndsys.drv",,1 system.ini,drivers,"aux*=sndsys.drv",,1 system.ini,drivers,"mixer*=sndsys.drv",,1 [WSS.CopyList] mssndsys.vxd,, mssndsys.drv,, msopl.drv,, [WSS.DelList] vsndsys.386,,,1 sndsys.drv,,,1
The following section adds the multimedia specific entries to the registry. The Driver entry is used by the multimedia device loader and is the supporting VxD for the device. Each of the subclasses (wave, mixer, aux and midi) contain driver entries and descriptions for each of the subclass drivers.
[PNPB007.AddReg] HKR,,Driver,,mssndsys.vxd HKR,Drivers\wave\mssndsys.drv,Driver,,mssndsys.drv HKR,Drivers\wave\mssndsys.drv,Description,,%*PNPB007.DeviceDesc% HKR,Drivers\mixer\mssndsys.drv,Driver,,mssndsys.drv HKR,Drivers\mixer\mssndsys.drv,Description,,%*PNPB007.DeviceDesc% HKR,Drivers\aux\mssndsys.drv,Driver,,mssndsys.drv HKR,Drivers\aux\mssndsys.drv,Description,,%*PNPB007.DeviceDesc% HKR,Drivers\midi\msopl.drv,Driver,,msopl.drv HKR,Drivers\midi\msopl.drv,Description,,%V_INTERNAL% HKR,Drivers,SubClasses,,"wave,midi,aux,mixer"
The following sections are standard registry modifications. The [MIXER.AddReg] section automatically starts the system tray for the tray volume control. If your device has a supporting mixer driver, you should reference this section as demonstrated above. The [WAVE.AddReg] section cleans up any previous driver entries for the device node and sets the device loader to MMDEVLDR.VXD.
[MIXER.AddReg] HKLM,Software\Microsoft\Windows\CurrentVersion\Run,SystemTray,,"SysTray.Exe" [WAVE.AddReg] HKR,,DevLoader,,mmdevldr.vxd HKR,Drivers,MIGRATED,,0 HKR,Drivers\midi,,, HKR,Drivers\wave,,, HKR,Drivers\mixer,,, HKR,Drivers\aux,,,
The following section describes the disk names and file layout on the disks.
[SourceDisksNames] 1="New Media .WAV Jammer Driver Disk ",, 0001 [SourceDisksFiles] mssndsys.drv=1 msopl.drv=1 mssndsys.vxd=1
For multimedia devices, the default destination directory is the SYSTEM directory. The [Strings] section contains the localizable strings for the .INF file.
[DestinationDirs] DefaultDestDir = 11 ; LDID_SYS [Strings] ;Localizable strings NMCMfgName="New Media Corporation" PCMCIA\New_Media_Corporation-.WAVjammer-6B54.DeviceDesc="New Media .WAVjammer audio adapter" *PNPB007.DeviceDesc="MS Windows Sound System Compatible" V_INTERNAL="Internal OPL2/OPL3 FM Synthesis"
If MIDI drivers support more than one port in a driver, additional registry entries must be made for each port, as shown below. This allows each port to be configured independently from the Control Panel. Following is a sample [MULTMIDI.Addreg] section for a MIDI driver supporting more than one MIDI port:
[MULTMIDI.AddReg] HKR,Drivers\midi\MultiPort_Port_0000,Description,,%Port0.DeviceDesc% HKR,Drivers\midi\MultiPort_Port_0000,Driver,, multmidi.drv HKR,Drivers\midi\MultiPort_Port_0000,External,1,01,00,00,00 HKR,Drivers\midi\MultiPort_Port_0000,NumPorts,1,03,00,00,00 HKR,Drivers\midi\MultiPort_Port_0000,Port,1,00,00,00,00 HKR,Drivers\midi\MultiPort_Port_0001,Description,,%Port1.DeviceDesc% HKR,Drivers\midi\MultiPort_Port_0001,Driver,,multmidi.drv HKR,Drivers\midi\MultiPort_Port_0001,External,1,01,00,00,00 HKR,Drivers\midi\MultiPort_Port_0001,NumPorts,1,03,00,00,00 HKR,Drivers\midi\MultiPort_Port_0001,Port,1,01,00,00,00 HKR,Drivers\midi\MultiPort_Port_0002,Description,,%Port2.DeviceDesc% HKR,Drivers\midi\MultiPort_Port_0002,Driver,,multmidi.drv HKR,Drivers\midi\MultiPort_Port_0002,External,1,01,00,00,00 HKR,Drivers\midi\MultiPort_Port_0002,NumPorts,1,03,00,00,00 HKR,Drivers\midi\MultiPort_Port_0002,Port,1,02,00,00,00 [Strings] Port0.DeviceDesc="Multiport MIDI Driver: MIDI Port 0" Port1.DeviceDesc="Multiport MIDI Driver: MIDI Port 1" Port2.DeviceDesc="Multiport MIDI Driver: MIDI Port 2"
Windows 95 provides the capability to connect MIDI filter drivers to the system using the device registry. MIDI filters are installed in SYSTEM.INI. This is similar to the way non-Plug and Play MIDI drivers are installed. Following is a sample INF file for installing a MIDI Filter. Note that the [FILTER] section defines MediaType=Software. This is necessary for proper installation of any software device. A reboot is always required for software-device installations. More that one MIDI filter can be installed. One next boot the MIDI Filters are installed in SYSTEM.INI as "MIDIFilter=x.drv", "MIDIFilter1=y.drv", "MIDIFilter2=z.drv", and so on.
[Version] Signature="$CHICAGO$" Class=MEDIA [Manufacturer] %MfgName%=Generic [Generic] %Filter.DeviceDesc%=FILTER [FILTER] AddReg=FILTER.AddReg CopyFiles=FILTER.Copy MediaType=Software [FILTER.Copy] msthru.drv [FILTER.AddReg] HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\newdrivers\midi\msthru.drv,,, HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\newdrivers\midi\msthru.drv,Description,,%Filter.DeviceDesc% HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\newdrivers\midi\msthru.drv,Driver,,msthru.drv HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\newdrivers\midi\msthru.drv,Parameters,, HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\newdrivers\midi\msthru.drv,MIDIFilter,1,01