updated 1998 Jan 06.
fixed a few broken links 2003-06-22.
Mangled email addresses 2003-07-21 to hopefully make them more spam-resistant.
a FAQ on ".inf" file format.
see device_driver.html for other device driver information.
The ".inf" file format is used to create "oemsetup.inf" files that tell Windows how to properly set up and install device drivers for associated hardware.
If you have any nagging questions, please send me email so I can include them in this FAQ. If you know the answers to any of these questions, ditto.
If we combine our knowledge, this could be a useful resource to all of us.
David Harwell http://crucifer.net/ /* was http://web.novaone.net/DavidHar/ */ has written "How to Write an INF" http://crucifer.net/INF_Web/ (and "Did you know that you could associate a file extension with more than one program?"). (and a hilarious MicroSpeak Dictionary )
This is mostly Windows Device Driver stuff; I have more programming stuff for non-Windows device drivers and non-device-driver programs elsewhere.
There's a little bit of device driver information in my pc_card_faq.html .
Hardware Development information http://www.microsoft.com/hwdev/ Plug and Play specifications and hardware-related white papers.
Hardware Design Guide Supplement http://www.microsoft.com/hwdev/pc95dsgn.htm
Windows Hardware Quality Labs (WHQL) http://www.microsoft.com/hwtest/ testing program for the "Designed for Microsoft Windows 95" logo or testing for Windows NT 4.0
Device Driver Kits (DDK). All DDK information for both Windows 95 and Windows NT is provided via Microsoft Developer Network (MSDN) Professional membership (formerly "Level 2"). To contact MSDN, send e-mail to <msdn at microsoft.com> or call (800) 759-5474. See also the Developers Only web site at http://www.microsoft.com/devonly/
PC 97 Design Guide draft http://www.microsoft.com/hwdev/pc97.htm
Look in Chapter 6, "Device Information Files", of PnP.doc in the Win95 ddk.
Included are directions for using InfEdit.exe to prepare and edit ".inf" files.
-- From: Ron Bass <rbass at intersecttech.com> Date: Fri, 9 Feb 1996 To: ddk-l at albany.net
The "Windows and Windows NT Device Driver Development" mailing list: "DDK-L at PEACH.EASE.LSOFT.COM". Subscription information http://www.lsoft.com/scripts/wl.exe?SL1=DDK-L&H=PEACH.EASE.LSOFT.COM . Archives: http://peach.ease.lsoft.com/archives/ddk-l.html
Q: We have an NDIS driver, and we want to force the system to have
interrupt 10 as the *default setting*. It appears that if a number
lower than 10 is present in the resource list [of the .inf], that number will show
up even if 10 is place first in the ordered list.
Is there a way around this ?
-- From: "Jeffrey M. Goodwin" <osgroup at CAROLINE.OSGROUP.COM> http://www.osgroup.com Date: Mon, 8 Dec 1997 21:57:34 -0600 To: DDK-L at PEACH.EASE.LSOFT.COM
Date: Fri, 23 Feb 1996 23:35:50 From: pritikin at TGV.COM (Max Pritikin) To: cary at agora.rdrop.com Subject: Re: ".inf" files Cary, I needed to solve the problems with .INF files a while back. What we ended up doing was hooking every function in the DLL's that actually run the .INF file and checking out what (and when) they do what they do. The INFEDIT.EXE program that was available at the time didn't seem to be very nice -- so we did without it. This turns out to be fairly easy (which is why we did it) as all the .INF file stuff is parsed in 16-bit land. We didn't need to muck with injecting our DLL into somebody else address space or anything. Instead we wrote an application that gets the address of each and every procedure we were interested in (this included most of the functions in NETDI.DLL, SETUPX.DLL and a few in the KERNEL) and patching the first few instructions to our own UniversalTrap function. We then logged what function was called, and what the parameters were. By keeping track of the "depth" of calls into each DLL we also had a reasonable idea of what sorts of operations the DLLs were trying to do. We then RETF back to the function and let it run as normal... In addition most of the error codes used internally are documented in setupx.h (i think --- it is late and i don't feel like digging through the DDK right now) so we were able to produce _slightly_ better error information when things started to unwind. Shrug - i don't know how useful it all was... most of our problems boiled down to the .INF file format being goal based rather than procedural. We were doing things like replacing files that already existed with different (not greater in version number, just different) files. For example WINSOCK.DLL. I think i'm rambling -- it is time to go home. good luck, -Max Pritikin pritikin at tgv.com > I've just got the MSDN 1996 Jan CD-ROMS. > There's a "infedit.exe" program that makes creating .INF files *much* > easier. > > There's also pages and pages of stuff on (primary) MSDN Library CD-ROM on > how to use "infedit.exe". > > I finally understand how to specify the I/O ranges properly. > > You know, we should pool our knowledge and write a FAQ on .inf files. > > For some reason, my .inf file wants to copy my (single) VxD device driver > off the installation disk twice. And the System outline seems to display my > device twice. > > Do you know about the ddk-l device driver mailing list ? > >> [my original mail asking about debugging tools for INF files] > email David Cary <d.cary at ieee.org> or use <http://www.rdrop.com/~cary/> > for future technologies including the PCMCIA PC Card FAQ.
A: I ended up using the 3com driver inf file and modified it for my own use.
It's MUCH easier with the kernel debugger. (Use the following statement in the [InstallOption] section
set !G:DebugOutputControl = 1and then use Debug-Output to write to the screen.)
From: brianf at werple.mira.net.au Date: Fri, 15 Mar 1996 15:01:08 +1000 To: ddk-l at albany.net Subject: Re: ddk-l: OEMSETUP for EISA/ISA NDIS Drivers
I have the book _Microsoft Windows 95 Resource Kit_ (from Microsoft Press), which has a whole appendix on ".inf" files, and even a sample SCSI.INF file.
There's really only one thing that doesn't make sense to me: the line
I/OConfig = 4@180-1B3%fff0(3:0:)there's a little comment that says this means
;Allocate 4 ports at base 180,190,1A0 or 1B0, ;device decodes 10 bits of I/O address and uses no Aliases.Uh huh. It's not clear to me how to modify that line to indicate what *my* card/hardware requires.
I suspect there may be something about it in the MSDN CD-ROMs, but I find
it all too easily to get lost in there. (Over 10 CD-ROMs of info ...).
--David Cary <d.cary at ieee.org>
Status: N Encoding: 38 TEXT Date: Tue, 26 Nov 1996 10:26:56 -0600 Reply-To: Windows and Windows NT Device Driver Development <DDK-L at PEACH.EASE.LSOFT.COM> From: "Daniel E. Germann" <dgermann at DIGITALAUDIO.COM> Subject: Re: [DDK-L] 9X: .INF files and memory regions To: DDK-L at PEACH.EASE.LSOFT.COM David McCullough wrote... >> >>As long as we're talking about .INF files... >> > >> >>I've been tearing my hair out trying to find a way to get Configuration >> >>Manager to put the memory regions on our non-PnP ISA card (the card >> >>>has a switch-selectable I/O address, but software-configurable memory >> >>>addresses and interrupts) in a sane spot. > >You put a LogConfig section into your INF file. This section describes >what resources your card uses. WIN95 will then look at these and find >free resources that your card can support, and then assign them to your >card. Search the DDK doc for IOConfig, IRQConfig, MEMConfig and >LogConfig. As always you will need to look at real implementations in >/WINDOWS/INF. I think I've done that. Device Manager likes our card just fine, and I can change the address exactly like I'd expect to. My problem is that the Add New Hardware Wizard almost always picks default addresses that conflict with things in high memory (C0000-EFFFF), like UMBs. I'm guessing that Win95 plug-and-play doesn't know about HIMEM.SYS or EMM386.EXE memory regions. Does anyone have any info about that (and how to get around it)? FYI, here's my .INF file LogConfig section (which seems to work fine): ConfigPriority=HARDRECONFIG IOConfig=200-203(3ff::),240-243(3ff::),280-283(3ff::),2a0-2a3(3ff::) MemConfig=1000@c0000-effff%fffff000 MemConfig=8000@c0000-effff%ffff8000 IRQConfig=3,4,5,9,10,11,12,15 Dan Germann Digital Audio Labs, Inc. dgermann at digitalaudio.com
Approved-By: owner-ddk-l at CHSW.COM MIME-Version: 1.0 Date: Sat, 28 Sep 1996 17:00:17 +0000 Reply-To: Windows and Windows NT Device Driver Development <DDK-L at PEACH.EASE.LSOFT.COM> From: Dan Mathis <dmathis at NJ1.REAL-TIME-DIGITAL.COM> Organization: Real-Time Digital Subject: [DDK-L] NT: driver installation script Hello Everyone, I have a NT networking card that makes use of a .inf setup file that calls a custom dialog using a dll supplied on the installation disk. My question is, How did they build this dll? The following is found in the .inf file: LoadLibrary "disk 1" "file.dll" hLib Read-Syms FileDependentDlg$ UI Start "InputDlg" $(hLib) set ExitButton = $(ButtonPressed) FreeLibrary $(hlib) When I do a dumpbin /all of file.dll I don't find any exported functions. Does anyone know their secret (if it is a secret)? Also, I have tried the suggested method in the DDK, but my script fails to find the exported function (I'm currently looking into this, too). Thanks Dan MathisA: ???
The following INF file fails to install a virtual com port ... anyone know why?
Symptom is that after walking through all the dialogs as expected, AND copying the driver file to the destination, the hardware wizard displays "Because the device installation was cancelled, Windows did not copy all the files needed for this device"
The one file listed in the copyfiles was, in fact, copied. No registry entries are made.
[version] ;LayoutFile=layout.inf signature="$CHICAGO$" Class=Ports Provider=%MS% [DestinationDirs] DefaultDestDir = 11 ;LDID_SYS ; Install class "Ports" ;---------------------------------------------------------- [ClassInstall] AddReg=PortsClass.AddReg [PortsClass.AddReg] HKR,,,,%PortsClassName% ; Drivers ;---------------------------------------------------------- [Manufacturer] %Vendor%=Vendor [Vendor] %VendorModel.DeviceDesc% = ModelPort, COM5 ; Communications Port [Ports.AddReg] HKR,,NoSetupUI,,1 ; COM sections ;---------------------------------------------------------- [ModelPort] AddReg=ModelPort.AddReg CopyFiles=ModelPort.Copy LogConfig=cVendorModel [ModelPort.Copy] xserial.vxd [ModelPort.AddReg] HKR,,DevLoader,,*vcomm HKR,,Enumerator,,serenum.vxd HKR,,PortDriver,,xserial.vxd HKR,,ConfigDialog,,serialui.dll HKR,,DCB,3,1C,00,00,00, 80,25,00,00, 11,33,00,00, 00,00, 0a,00, 0a,00, 08, 00, 00, 11, 13, 00, 00, 00 HKR,,PortSubClass,1,01 HKR,,EnumPropPages,,"serialui.dll,EnumPropPages" ;[PCBITD.det] ;AddReg=Ports.AddReg,DevMap.AddReg [cVendorModel] ConfigPriority=HARDRECONFIG IOConfig=8@100-ffff%fff8(3ff::) [DevMap.AddReg] HKLM,hardware\devicemap\serialcomm,COM5,,COM5 ; User readable strings ;---------------------------------------------------------- [Strings] MS = "Microsoft" Std = "(Standard port types)" Vendor = "Vendor Corporation" PortsClassName = "Ports (COM & LPT)" VendorModel.DeviceDesc = "Vendor Model Virtual Port"-- Jay Lowe / Parallel Technologies, Inc. / 206-869-1136 / 206-869-1133 fax
A1: Date: Sun, 23 Mar 1997 18:38:59 -0800 From: Jay Lowe <jaylowe at LPT.COM> Subject: Re: [DDK-L] 9X: Virtual Port INF fails, why? To: DDK-L at PEACH.EASE.LSOFT.COM
Jay Lowe[SMTP:jaylowe at LPT.COM] wrote: > The following INF file fails to install a virtual com port ... anyone know why?
Duh ... remove the embedded EOL in the DCB data. Then it works.
Just thought you'd want to know.
-- Jay Lowe / Parallel Technologies, Inc. / 206-869-1136 / 206-869-1133 fax
A2: Date: Mon, 24 Mar 1997 09:50:31 +-200 From: Michael Grabelkovsky <michael at SLINK.CO.IL> Subject: Re: [DDK-L] 9X: Virtual Port INF fails, why? To: DDK-L at PEACH.EASE.LSOFT.COM
Jay Lowe wrote: <<<<<<<<<<<<<<<<<<<<<< The following INF file fails to install a virtual com port ... anyone know why? Symptom is ... >>>>>>>>>>>>>>>>>>>
The following file worked fine for me. I wrote it year ago. Now I'd delete IOConfig lines, it doesn't need I guess.
Regards, Michael Grabelkovsky, SmartLink Ltd., Netanya, Israel.
[Version] Signature=$CHICAGO$ Class=Ports Provider=%COMPANY_NAME% [ClassInstall] [DestinationDirs] MTL.COPY = 11 ;LDID_SYS \Windows\system directory [Manufacturer] %COMPANY_NAME%=MODEL_SECTION [MODEL_SECTION] %MODEL_NAME_1%=MTL.Install,*AAL0123 [MTL.Install] CopyFiles=MTL.COPY AddReg=MTL.Addreg LogConfig = c34,c3a,c43,c4a,caa ;UpdateInis=MTL.SYSTEEM.INI.UPDATE [MTL.Addreg] HKR,,PortSubClass,1,01 HKR,,DevLoader,,*vcomm HKR,,PortDriver,0,mtlmdm.vxd HKR,,Contention,,*vcd HKR,,ConfigDialog,,serialui.dll HKR,,DCB,3,1C,00,00,00, 00,10,0E,00, 11,33,00,00, 00,00, 0a,00, 0a,00, 08, 00, 00, 11, 13, 00, 00, 00 HKR,,EnumPropPages,,"serialui.dll,EnumPropPages" [c34] ; COM3, IRQ4 ConfigPriority=HARDRECONFIG IOConfig=3e8-3ef(3ff::) IRQConfig=S:4 [c3a] ; COM3, any IRQ ConfigPriority=HARDRECONFIG IOConfig=3e8-3ef(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [c43] ; COM4, IRQ3 ConfigPriority=HARDRECONFIG IOConfig=2e8-2ef(3ff::) IRQConfig=S:3,5 [c4a] ; COM4, any IRQ ConfigPriority=HARDRECONFIG IOConfig=2e8-2ef(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [caa] ; Any base, any IRQ ConfigPriority=HARDRECONFIG IOConfig=8@100-ffff%fff8(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [ControlFlags] [SourceDisksNames] 1=MtlSoftModemDisk,mtlmodem,0000-0000 [MTL.COPY] mtlmdm.vxd mtlstrm.vxd mtlhmad0.vxd mtlfax.vxd [MTL.SYSTEEM.INI.UPDATE] system.ini, 386Enh, ,"device=mtlstrm.vxd", system.ini, 386Enh, ,"device=mtlmdm.vxd", [Strings] COMPANY_NAME="SmartLink Ltd." MODEL_NAME_1="SoftModem Port"
I am developing a plug and play driver for a custom PCMCIA card. The card does not contain resource requirements in the tuples, so I provide that info as a tuple override in the .inf file.
The memory Window resource gets allocated, and the Vxd gets loaded when the card is inserted, but For some reason the VxD never gets the CONFIG_START message. It is getting the PnPNewDevNode and CONFIG_FILTER messages.
When I look in the device manager, the device shows up with a yellow exclamation point. I look at the properties and the following information is displayed:
General Tab: ----------- Hardware Version: Not Available Device Status: This device is not present, not working properly, or does not have all the drivers installed. See you hardware documentation. (code 10) Driver Tab: ---------- Shows the correct Vxd filename and revision info. (Retail Win95 release) This is not the case for OSR2. Resources Tab: ------------- Memory range assigned according to the .inf file. No conflicts.
Does anyone have an idea of what might be wrong? The behavior is the same for the Retail and the OSR2 releases except for the driver tab on the device properties dialog box.
Any help will be greatly appreciated.
Terry Peterson petersot at motsat.sat.mot.com
Q: Date: Thu, 21 Dec 1995 11:52:39 -0500 To: ddk-l at albany.net From: simon at cogno.com (Simon Inwood) Subject: ddk-l: Help needed debugging OEMSETUPNT.INF
I know it should be simple but following the documentation doesn't work.
How do I get debug messages printed from a oemsetup.inf script?
I've added "set !G:DebugOutputControl = 1" to the top of my script.
On my target I run the 'control panel'->Network->'Add Adapter' then select <Other>. My script loads but there are no debug messages sent to the host.
My machine are setup for kernel debugging, do I need to set them up to use WinDbgRm-WinDbg?
Simon Inwood Software Developer Cognologic Software Inc. 5890 Monkland Avenue. Suite 405B Montreal H4A 1G2 Quebec, Canada Tel. (514) 481-4978 Fax. (514) 481- 9742 Email: simon at cogno.com WWW: http://www.cogno.com
I've just got the MSDN 1996 Jan CD-ROMS. There's a "infedit.exe" program that makes creating .INF files *much* easier. There's also pages and pages of stuff on (primary) MSDN Library CD-ROM on how to use "infedit.exe". I finally understand how to specify the I/O ranges properly. You know, we should pool our knowledge and write a FAQ on .inf files. For some reason, my .inf file wants to copy my (single) VxD device driver off the installation disk twice. And the System outline seems to display my device twice.
Date: Wed, 28 Jan 1998 10:22:57 -0600 Reply-To: Windows and Windows NT Device Driver Development <DDK-L at PEACH.EASE.LSOFT.COM> From: Larry Cawley <cawley at IBM.NET> Subject: Re: [DDK-L] 9x: INFEDIT.EXE Bugs InfEdit will also remove any comments from your file. When I finally deciphered some of the INF syntax, I would comment my INF files so I didn't have to rediscover things when I wanted to change a parameter. If you bring an INF file into INFEDIT and save it, it removes all the comments. The tool is marginally helpful when you first start messing with INF files but that's the extent of its helpfulness. --- Larry Cawley CreativeMedia Software Solutions, Inc. http://www.CreativeMediaSoftware.com cawley at ibm.net -----Original Message----- From: Andrew Pargeter <andrewp at WARWICK.NET> To: DDK-L at PEACH.EASE.LSOFT.COM Date: Wednesday, January 28, 1998 9:30 AM Subject: Re: 9x: INFEDIT.EXE Bugs You can actually create .inf files with infedit.exe for custom, or non supported device types quite easily. Although, I would say that in most cases it easier to just edit the file with notepad.exe once you decipher the documentation on MSDN (which is really poor). ---------- From: Joe Cotellese Sent: Wednesday, January 28, 1998 10:12 AM To: DDK-L at PEACH.EASE.LSOFT.COM Subject: Re: [DDK-L] 9x: INFEDIT.EXE Bugs Don't use it!! I could never get this utility to work reliably. Always ended up with an INF file that was unusable. I don't know if this problem is for every class of driver you want to install but it definitely does not create multimedia class INF files very well.
Since I am currently not actively working on device driver projects, I would appreciate any volunteers to take over maintenance of this ".inf FAQ" .
. . .
Started: 1998 Jan 06
Original Author: David Cary.
Send comments, suggestions, bug reports to