Re: Win2k inf files - Need some HELP!

xxxxx@ieee.org said:

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 have a variety of drivers that are NT4 that we recompiled and installed
under WIN2000. It worked on some machines, but not others. We concluded
that the facade of compatibility was a lie, so watch out! It may work for
you, but it may well *not* work for someone else.

Once we got to WDM drivers, we found that InstallShield or InstallerVise
installers were no longer able to generate installers for these drivers
as you need to negotiate with the PnP demon to get PCI devices installed,
and that is where the .inf files come in.

There is a PnP setup API that custom installers can use to install the
device drivers, but it is a WDM driver specific thing and 'though we toyed
with extending InstallerVise to support PnP driver installation, we conceded
that the users are going to be facing the “Hardware Wizard” anyhow so we
were pretty much compelled to make the “have disk” route as easy for the
user as possible.

(Installing hardware is more complicated for the Win2000 user. Accept it.)

xxxxx@ieee.org said:

-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?

Yes because some of it tells the PnP demon what to do. Note that Win2000
PnP requires some slightly different registry entries. You need to pick
through the win2kddk documentation with a very fine tooth comb.

xxxxx@ieee.org said:

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

You have to let the Windows installer put it in a special directory.
Either the hardware wizard does it, or a custom installer calls the
PnP demon API to make it happen.

xxxxx@ieee.org said:

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

Nope. Even the custom installer route requires an INF file, as that
file is stored in the accursed depths of the PnP demon’s lair, and is
scanned when new cards (of any type) are installed or removed. That is
how it associates drivers with discovered devices.

Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”

Greetings
You could in Theory add the required Keys during your install so that
the hardware discovery wizard would be tricked into believing that the
hardware and driver are already installed and never issue the new
hardware found dialog at all.
I am not sure if these keys will all be required or if even some others
are required for PCI as well but I would start by synthesizing the
Hardware Tree Keys for your device and what I call the Devnode keys and
values under the
HKLM\System\CurrentControlSet\Enum key.
I have done this for PNP Isa devices but not yet for Pci But it should
be possible to do Pci as well.
Thanks
Sanford Hayes
Livingston & Co. Inc.
xxxxx@livco.com
www.livco.com

-----Original Message-----
From: Barry O. Fisher [mailto:xxxxx@ieee.org]
Sent: Wednesday, November 01, 2000 4:04 PM
To: NT Developers Interest List
Subject: [ntdev] Win2k inf files - Need some HELP!

snip------

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


You are currently subscribed to ntdev as: xxxxx@livco.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

A few words of warning here.

First you need to be aware that Windows 2000 will disable all power
management features whenever a NT 4 legacy driver is loaded. This means
that users will not be able to suspend, or hibernate their systems after
installing your device if it uses a NT 4 style driver. This often
results in support calls either to you or to Microsoft.

Second, there are several other class specific gotchas with regards to
NT 4 style drivers running under Windows 2000. If you want to pursue
this further, reply to me offline describing your device and I’ll get
some more info.

Third, if this device is being used in a variety of different PCs, then
you’ll need test your device in a variety of different systems. Your
device may appear to work fine in one computer but have problems in
others.

I understand it’s difficult for hardware vendors to find the time and
resources to convert their drivers to WDM to support Windows 2000, but
trying to get existing NT 4 drivers to function well under Windows 2000
is risky and may not be worth the effort.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

-----Original Message-----
From: Gary Little [mailto:xxxxx@delphieng.com]
Sent: Wednesday, November 01, 2000 1:53 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

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


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Yes, in theory you could do this. It might even work on a few systems
with certain hardware installed. But it would be less likely to work on
a large variety of systems. And it would be very unlikely to work after
the user upgrades to a newer o/s release.

Circumventing the rules almost always results in problems. The problems
may mask themselves for a while, but they’ll pop up sooner or later.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

-----Original Message-----
From: Hayes, Sanford [mailto:xxxxx@livco.com]
Sent: Wednesday, November 01, 2000 2:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Greetings
You could in Theory add the required Keys during your install so that
the hardware discovery wizard would be tricked into believing that the
hardware and driver are already installed and never issue the new
hardware found dialog at all.
I am not sure if these keys will all be required or if even some others
are required for PCI as well but I would start by synthesizing the
Hardware Tree Keys for your device and what I call the Devnode keys and
values under the
HKLM\System\CurrentControlSet\Enum key.
I have done this for PNP Isa devices but not yet for Pci But it should
be possible to do Pci as well.
Thanks
Sanford Hayes
Livingston & Co. Inc.
xxxxx@livco.com
www.livco.com

-----Original Message-----
From: Barry O. Fisher [mailto:xxxxx@ieee.org]
Sent: Wednesday, November 01, 2000 4:04 PM
To: NT Developers Interest List
Subject: [ntdev] Win2k inf files - Need some HELP!

snip------

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


You are currently subscribed to ntdev as: xxxxx@livco.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Sandy,

For us, this was a “stop gap” effort that allowed us to proceed with the
port of a layered driver model to 2000. Our customers are aware that a
legacy driver hinders the power management of 2000.

Gary

-----Original Message-----
From: Sandy Spinrad [mailto:xxxxx@Exchange.Microsoft.com]
Sent: Wednesday, November 01, 2000 3:07 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

A few words of warning here.

First you need to be aware that Windows 2000 will disable all power
management features whenever a NT 4 legacy driver is loaded. This means
that users will not be able to suspend, or hibernate their systems after
installing your device if it uses a NT 4 style driver. This often results
in support calls either to you or to Microsoft.

Second, there are several other class specific gotchas with regards to NT 4
style drivers running under Windows 2000. If you want to pursue this
further, reply to me offline describing your device and I’ll get some more
info.

Third, if this device is being used in a variety of different PCs, then
you’ll need test your device in a variety of different systems. Your device
may appear to work fine in one computer but have problems in others.

I understand it’s difficult for hardware vendors to find the time and
resources to convert their drivers to WDM to support Windows 2000, but
trying to get existing NT 4 drivers to function well under Windows 2000 is
risky and may not be worth the effort.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

Instead of synthesizing the hardware key (very bad thing to do), you should
provide a dummy NULL driver INF file that will not only prevent the new
hardware found dialog but also make the device appear with a meaningful
description in the device manager (instead of unknown device with a yellow
bang). If you need a sample NULL driver inf file, let me know.

-Eliyas

-----Original Message-----
From: Sandy Spinrad [mailto:xxxxx@Exchange.Microsoft.com]
Sent: Wednesday, November 01, 2000 3:17 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Yes, in theory you could do this. It might even work on a few systems with
certain hardware installed. But it would be less likely to work on a large
variety of systems. And it would be very unlikely to work after the user
upgrades to a newer o/s release.

Circumventing the rules almost always results in problems. The problems may
mask themselves for a while, but they’ll pop up sooner or later.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

-----Original Message-----
From: Hayes, Sanford [ mailto:xxxxx@livco.com
mailto:xxxxx ]
Sent: Wednesday, November 01, 2000 2:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Greetings
You could in Theory add the required Keys during your install so that
the hardware discovery wizard would be tricked into believing that the
hardware and driver are already installed and never issue the new
hardware found dialog at all.
I am not sure if these keys will all be required or if even some others
are required for PCI as well but I would start by synthesizing the
Hardware Tree Keys for your device and what I call the Devnode keys and
values under the
HKLM\System\CurrentControlSet\Enum key.
I have done this for PNP Isa devices but not yet for Pci But it should
be possible to do Pci as well.
Thanks
Sanford Hayes
Livingston & Co. Inc.
xxxxx@livco.com
www.livco.com

-----Original Message-----
From: Barry O. Fisher [mailto:xxxxx@ieee.org
mailto:xxxxx]
Sent: Wednesday, November 01, 2000 4:04 PM
To: NT Developers Interest List
Subject: [ntdev] Win2k inf files - Need some HELP!

snip------

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


You are currently subscribed to ntdev as: xxxxx@livco.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</http:></mailto:xxxxx></mailto:xxxxx>

RE: [ntdev] RE: Win2k inf files - Need some HELP!Eliyas:
I would appreciate the NULL driver inf file. Thanks!

Also thanks to all who have responded. The suggestions have been great and I appreciate it.
-Barry
----- Original Message -----
From: Eliyas Yakub
To: NT Developers Interest List
Sent: Wednesday, November 01, 2000 7:03 PM
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Instead of synthesizing the hardware key (very bad thing to do), you should provide a dummy NULL driver INF file that will not only prevent the new hardware found dialog but also make the device appear with a meaningful description in the device manager (instead of unknown device with a yellow bang). If you need a sample NULL driver inf file, let me know.

-Eliyas

-----Original Message-----
From: Sandy Spinrad [mailto:xxxxx@Exchange.Microsoft.com]
Sent: Wednesday, November 01, 2000 3:17 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Yes, in theory you could do this. It might even work on a few systems with certain hardware installed. But it would be less likely to work on a large variety of systems. And it would be very unlikely to work after the user upgrades to a newer o/s release.

Circumventing the rules almost always results in problems. The problems may mask themselves for a while, but they’ll pop up sooner or later.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

-----Original Message-----
From: Hayes, Sanford [mailto:xxxxx@livco.com]
Sent: Wednesday, November 01, 2000 2:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Win2k inf files - Need some HELP!

Greetings
You could in Theory add the required Keys during your install so that
the hardware discovery wizard would be tricked into believing that the
hardware and driver are already installed and never issue the new
hardware found dialog at all.
I am not sure if these keys will all be required or if even some others
are required for PCI as well but I would start by synthesizing the
Hardware Tree Keys for your device and what I call the Devnode keys and
values under the
HKLM\System\CurrentControlSet\Enum key.
I have done this for PNP Isa devices but not yet for Pci But it should
be possible to do Pci as well.
Thanks
Sanford Hayes
Livingston & Co. Inc.
xxxxx@livco.com
www.livco.com

-----Original Message-----
From: Barry O. Fisher [mailto:xxxxx@ieee.org]
Sent: Wednesday, November 01, 2000 4:04 PM
To: NT Developers Interest List
Subject: [ntdev] Win2k inf files - Need some HELP!

snip------

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


You are currently subscribed to ntdev as: xxxxx@livco.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)