Win2k inf files - Need some HELP!

Hello All:
We have a PCI card and associated device driver that works splendidly under
NT 4.0 SP6. The DriverEntry routine of this driver ennumerates the PCI bus,
locates our card, and allocates the appropriate memory for I/O etc. The
user installs our software using InstallShield which puts the appropriate
entries in the Registry for the user.

We want to offer this hardware/device driver under Win2000(as is for right
now). We will be upgrading the driver to the WDM model in due time. We
installed our product on Win2k and everything went ok until we rebooted the
machine. We got the Wizard which notified us that a new PCI device was
detected. Now we have some idea that we have to create an inf file but are
not sure what needs to be included or if an inf file is the only thing
needed. So here goes:

-What is the minimum amount of information that needs to be in the inf file
so that we do not get the ‘New Hardware Detected’ Wizard each time we boot
the machine AND allows the user to see that the device is working properly
in the Device Manager? Or are these two things mutually exclusive? By the
way if we choose the CANCEL button, our device is listed as a ‘Simple
Communications Device’ in the Device Manager but the memory addresses that
the card uses are red splatted. I am assuming that THIS IS NOT GOOD even
though our hardware works!

-It looks like you can put information in the inf file that will add
Registry entries. Registry info is supplied by our InstallShield script. Do
we need to duplicate this information in the inf file?

-Do we have to put the inf file in a special directory?

-Our driver usually gets installed in a directory that we have created. Must
the driver be installed in the …winnt\system32\drivers directory?

-Is there another way to do what we are trying to do WITHOUT using an onf
file?

If there is an article or documentation which explains all the steps
required, please point me in the correct direction.

I appreciate any help that can be given to us. Thanks in advance!!

Regards,
Barry O. Fisher
Principal
Creative Systems Concepts, Inc.
E-mail: xxxxx@ieee.org
Web: http://www.systemsconceptsinc.com

As far as the driver installation, you can forget InstallShield, you will
need a win2K INF file, and that is not as daunting as it seems. 2000 has
simplified INF files; note I said simplified, not better. :slight_smile:

This will be a legacy driver, or at least in my experience best installed as
a legacy driver. You will most likely need to make one change to your
DriverEntry that will allow your code to function on both NT 4 and 2000. In
your HalAssignSlotResources, you MUST pass a pointer to the DeviceObject.
This was optional under NT 4, but is required in 2000, and will work under
NT 4. You will get the 2000 bitch box about this not being a driver blessed
by Microsoft. You can eliminate the bitch box by setting the File Signature
Verification to what you want in System Properties.

Now to the INF file, here is one that worked for me:
Note that you will have to change all instances of Widget and make any other
proper changes for your situation.

Good luck,
Gary

; Install file for Widget
;
; Created by GenINF.
; GenINF is a product of Microsoft Corporation
;
;

[Version]
Signature = “$Windows NT$”
Class=LegacyDriver
ClassGIUD={8ecc055d-047f-11d1-a537-0000f8753ed1}
Provider=%WIDGET%
;CatalogFile=Widget.cat
DriverVer= 5/19/2000

[DestinationDirs]
DefaultDestDir = 12 ; DIRID_DRIVERS
Widget.Files.x86_10 = 10
Widget.Files.x86_11 = 11
Widget.Files.x86_12 = 12

[SourceDisksNames.x86]
0=%Desc_x860%

[SourceDisksNames.alpha]

[SourceDisksFiles.x86]
Widget.sys=0,

[SourceDisksFiles.alpha]

[Manufacturer]
%Widget%=WIDGET

[WIDGET]
%WidgetDesc%=Widget_Inst,PCI\VEN_1001&DEV_0110

[Widget_Inst.ntx86]
AddReg = Widget.AddReg.x86
CopyFiles = Widget.Files.x86_10, Widget.Files.x86_11, Widget.Files.x86_12,

[Widget_Inst.ntx86.Services]
AddService = %Widget_Service_Name%,0x00000002,Widget_Service_Instx86,
Widget_EventLog_Inst

[Widget_Service_Instx86]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\Widget.sys
LoadOrderGroup = Extended Base
AddReg = pnpsafe_pci_addreg

[Widget.AddReg.x86]
[Widget.Files.x86_10]
[Widget.Files.x86_11]
[Widget.Files.x86_12]
Widget.sys

[Widget_EventLog_Inst]
AddReg = Widget_EventLog_Inst.AddReg

[Widget_EventLog_Inst.AddReg]
HKR,EventMessageFile,%REG_EXPAND_SZ%,“%%SystemRoot%%\System32\IoLogMsg.dll;
%%SystemRoot%%\System32\Drivers\Widget.sys”
HKR,TypesSupported,%REG_DWORD%,7

[pnpsafe_pci_addreg]
HKR, Parameters\PnpInterface, 5, 0x00010001, 0x00000001

[Strings]

; *******Localizable Strings*******
DEG= “Widget Engineering INC”
Desc_x860= “”
WidgetDesc= “Widget driver”
Widgetx86_Service_Name= “Widget”

; *******Non Localizable Strings*******

SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVIVE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4

SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3

REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001