Win2000 + driver entry

Hello everybody, I wish you all a happy new year.

I have a question for the list.

I have two boards installed using the same driver. Will Win2000 call twice
the driver entry function of the driver?

Thank you very much.

HI.

As I know system will call you entry point only once. For two boards system will call your AddDevice routine twice.

“Nikolas Stylianides” wrote in message news:xxxxx@ntdev…
Hello everybody, I wish you all a happy new year.

I have a question for the list.

I have two boards installed using the same driver. Will Win2000 call twice the driver entry function of the driver?

Thank you very much.

The driver entry function will be called once. However, you will get a
separate PNP device initialisation for each device.

MH.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nikolas
Stylianides
Sent: 19 January 2005 09:47
To: Windows System Software Devs Interest List
Subject: [ntdev] Win2000 + driver entry

Hello everybody, I wish you all a happy new year.

I have a question for the list.

I have two boards installed using the same driver. Will Win2000 call
twice the driver entry function of the driver?

Thank you very much.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

This email and any attachments is confidential, may be legally privileged and is intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.

Thank you for your answer. I was pretty sure that driverentry function is
called only once. The problem is that I am porting my driver from WINNT 4.0
to Win2000.

When I call “HalAssignSlotResources” I have a peculiar situation. The “flag”
parameter of “PartialDescriptors” struct has value 0x31. I cannot find any
documentation for this value. Normally should be I/O for my Port and Memory
for my Memory. That is why I thought that maybe the driverentry function is
called twice and due to lack of protection something is corrupted. Does
anybody has an idea about the value of the “flag” parameter?

DriverEntry once at image load, but AddDevice twice.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Nikolas Stylianides
To: Windows System Software Devs Interest List
Sent: Wednesday, January 19, 2005 12:46 PM
Subject: [ntdev] Win2000 + driver entry

Hello everybody, I wish you all a happy new year.

I have a question for the list.

I have two boards installed using the same driver. Will Win2000 call twice the driver entry function of the driver?

Thank you very much.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Throw away this obsolete call and replace it with PnP MN_START_DEVICE path.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Nikolas Stylianides
To: Windows System Software Devs Interest List
Sent: Wednesday, January 19, 2005 1:34 PM
Subject: RE: [ntdev] Win2000 + driver entry

Thank you for your answer. I was pretty sure that driverentry function is called only once. The problem is that I am porting my driver from WINNT 4.0 to Win2000.

When I call “HalAssignSlotResources” I have a peculiar situation. The “flag” parameter of “PartialDescriptors” struct has value 0x31. I cannot find any documentation for this value. Normally should be I/O for my Port and Memory for my Memory. That is why I thought that maybe the driverentry function is called twice and due to lack of protection something is corrupted. Does anybody has an idea about the value of the “flag” parameter?


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

The CM_PARTIAL_RESOURCE_DESCRIPTOR Flags bit definitions are described in
the DDK and defined in ntddk.h. 0x31 maps to CM_RESOURCE_PORT_IO|
CM_RESOURCE_PORT_16_BIT_DECODE |CM_RESOURCE_PORT_POSITIVE_DECODE. For most
PCI devices you really do not care about these flags at all, you just need
to know if it is an IO space resource, a memory space resource or an
interrupt resource.

You should take the prior advice and not try to just get your nt4 pci driver
working on w2k but instead re-write the driver management code to be a w2k
pnp driver.

=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nikolas Stylianides
Sent: Wednesday, January 19, 2005 5:35 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Win2000 + driver entry

Thank you for your answer. I was pretty sure that driverentry
function is called only once. The problem is that I am porting my driver
from WINNT 4.0 to Win2000.

When I call “HalAssignSlotResources” I have a peculiar situation.
The “flag” parameter of “PartialDescriptors” struct has value 0x31. I cannot
find any documentation for this value. Normally should be I/O for my Port
and Memory for my Memory. That is why I thought that maybe the driverentry
function is called twice and due to lack of protection something is
corrupted. Does anybody has an idea about the value of the “flag” parameter?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank you very much for your answers. And you are right about porting the
driver to win2000. I was just trying to keep one version of the driver.