Hi all,
i'm writing a serial virtual port and i need to have more than one instance of
this driver.
If i install it more than one time i receive an error (unable to load the
driver).
How can i resolve ?
Do i need to write a bus enumerator driver ?
If yes, Is it separated from the other driver or could be the same one ?
Thanks a lot
Stefano M
You don’t do multiple instances of the driver, you create multiple device
objects that a single driver manages.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Stefano Mora - EOS S.r.l.” wrote in message
news:xxxxx@ntdev…
> Hi all,
> i’m writing a serial virtual port and i need to have more than one
instance of
> this driver.
> If i install it more than one time i receive an error (unable to load the
> driver).
> How can i resolve ?
> Do i need to write a bus enumerator driver ?
> If yes, Is it separated from the other driver or could be the same one ?
>
> Thanks a lot
> –
> Stefano M
>
>
>
NT supports at most one instance of a driver. A driver supports multiple
devices.
=====================
Mark Roddy
-----Original Message-----
From: Stefano Mora - EOS S.r.l. [mailto:xxxxx@eos.pr.it]
Sent: Wednesday, September 15, 2004 10:52 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Multiple instances of a driver
Hi all,
i'm writing a serial virtual port and i need to have more than one instance
of this driver.
If i install it more than one time i receive an error (unable to load the
driver).
How can i resolve ?
Do i need to write a bus enumerator driver ?
If yes, Is it separated from the other driver or could be the same one ?
Thanks a lot
Stefano M
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
Thanks Don,
so i must distinguish between different supported port from the PDEVICE_OBJECT
parameter ?
Since each virtual port has associated a 'real' serial port (or other driver) by
its relative PDEVICE_OBJECT, i must manage a table like:
VirtualDevObj1 - RealDevObj1
VirtualDevObj2 - RealDevObj2
VirtualDevObj3 - RealDevObj3
and so on ...
to address correctly the requests between ports, is it ?
Is there a suitable data structure to manage this table into a driver ?
Thanks a lot !
Ing. Stefano Mora
EOS S.r.l.
via Lega dei carrettieri, 1
43038 Sala Baganza (Parma) IT
email: xxxxx@eos.pr.it
----- Original Message -----
From: "Don Burn"
Newsgroups: ntdev
To:
Sent: Wednesday, September 15, 2004 4:59 PM
Subject: Re: Multiple instances of a driver
> You don't do multiple instances of the driver, you create multiple device
> objects that a single driver manages.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
> "Stefano Mora - EOS S.r.l." wrote in message
> news:xxxxx@ntdev...
> > Hi all,
> > i'm writing a serial virtual port and i need to have more than one
> instance of
> > this driver.
> > If i install it more than one time i receive an error (unable to load the
> > driver).
> > How can i resolve ?
> > Do i need to write a bus enumerator driver ?
> > If yes, Is it separated from the other driver or could be the same one ?
> >
> > Thanks a lot
> > --
> > Stefano M
> NT supports at most one instance of a driver.
…with the exception of second instance of SCSI miniport loaded for
dump/hiberfile path 
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Register a PnP device interfaces. Or invent the legacy-style names like
\.\COM%d.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Stefano Mora - EOS S.r.l.”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, September 15, 2004 7:21 PM
Subject: Re:[ntdev] Multiple instances of a driver
> Thanks Don,
> so i must distinguish between different supported port from the
PDEVICE_OBJECT
> parameter ?
> Since each virtual port has associated a ‘real’ serial port (or other driver)
by
> its relative PDEVICE_OBJECT, i must manage a table like:
> VirtualDevObj1 - RealDevObj1
> VirtualDevObj2 - RealDevObj2
> VirtualDevObj3 - RealDevObj3
> and so on …
> to address correctly the requests between ports, is it ?
> Is there a suitable data structure to manage this table into a driver ?
>
> Thanks a lot !
> –
> Ing. Stefano Mora
> EOS S.r.l.
> via Lega dei carrettieri, 1
> 43038 Sala Baganza (Parma) IT
> email: xxxxx@eos.pr.it
>
>
>
> ----- Original Message -----
> From: “Don Burn”
> Newsgroups: ntdev
> To:
> Sent: Wednesday, September 15, 2004 4:59 PM
> Subject: Re: Multiple instances of a driver
>
>
> > You don’t do multiple instances of the driver, you create multiple device
> > objects that a single driver manages.
> >
> >
> > –
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > Remove StopSpam from the email to reply
> >
> >
> >
> > “Stefano Mora - EOS S.r.l.” wrote in message
> > news:xxxxx@ntdev…
> > > Hi all,
> > > i’m writing a serial virtual port and i need to have more than one
> > instance of
> > > this driver.
> > > If i install it more than one time i receive an error (unable to load the
> > > driver).
> > > How can i resolve ?
> > > Do i need to write a bus enumerator driver ?
> > > If yes, Is it separated from the other driver or could be the same one ?
> > >
> > > Thanks a lot
> > > –
> > > Stefano M
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Put a pointer or other reference to the ‘real’ port in the device extension
of the virtual port. This is what the device extension is for, to hold the
data related to a given instance of the device.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
“Stefano Mora - EOS S.r.l.” wrote in message
news:xxxxx@ntdev…
> Thanks Don,
> so i must distinguish between different supported port from the
PDEVICE_OBJECT
> parameter ?
> Since each virtual port has associated a ‘real’ serial port (or other
driver) by
> its relative PDEVICE_OBJECT, i must manage a table like:
> VirtualDevObj1 - RealDevObj1
> VirtualDevObj2 - RealDevObj2
> VirtualDevObj3 - RealDevObj3
> and so on …
> to address correctly the requests between ports, is it ?
> Is there a suitable data structure to manage this table into a driver ?
>
> Thanks a lot !
> –
> Ing. Stefano Mora
> EOS S.r.l.
> via Lega dei carrettieri, 1
> 43038 Sala Baganza (Parma) IT
> email: xxxxx@eos.pr.it
>
>
>
> ----- Original Message -----
> From: “Don Burn”
> Newsgroups: ntdev
> To:
> Sent: Wednesday, September 15, 2004 4:59 PM
> Subject: Re: Multiple instances of a driver
>
>
> > You don’t do multiple instances of the driver, you create multiple
device
> > objects that a single driver manages.
> >
> >
> > –
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > Remove StopSpam from the email to reply
> >
> >
> >
> > “Stefano Mora - EOS S.r.l.” wrote in message
> > news:xxxxx@ntdev…
> > > Hi all,
> > > i’m writing a serial virtual port and i need to have more than one
> > instance of
> > > this driver.
> > > If i install it more than one time i receive an error (unable to load
the
> > > driver).
> > > How can i resolve ?
> > > Do i need to write a bus enumerator driver ?
> > > If yes, Is it separated from the other driver or could be the same one
?
> > >
> > > Thanks a lot
> > > –
> > > Stefano M
>
>
>
Sure !
Every device object owns a private DevExt !
Thanks a lot !!!!
Ing. Stefano Mora
EOS S.r.l.
via Lega dei carrettieri, 1
43038 Sala Baganza (Parma) IT
email: xxxxx@eos.pr.it
----- Original Message -----
From: "Don Burn"
Newsgroups: ntdev
To:
Sent: Wednesday, September 15, 2004 6:00 PM
Subject: Re: Multiple instances of a driver
> Put a pointer or other reference to the 'real' port in the device extension
> of the virtual port. This is what the device extension is for, to hold the
> data related to a given instance of the device.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
> "Stefano Mora - EOS S.r.l." wrote in message
> news:xxxxx@ntdev...
> > Thanks Don,
> > so i must distinguish between different supported port from the
> PDEVICE_OBJECT
> > parameter ?
> > Since each virtual port has associated a 'real' serial port (or other
> driver) by
> > its relative PDEVICE_OBJECT, i must manage a table like:
> > VirtualDevObj1 - RealDevObj1
> > VirtualDevObj2 - RealDevObj2
> > VirtualDevObj3 - RealDevObj3
> > and so on ...
> > to address correctly the requests between ports, is it ?
> > Is there a suitable data structure to manage this table into a driver ?
> >
> > Thanks a lot !
> > --
> > Ing. Stefano Mora
> > EOS S.r.l.
> > via Lega dei carrettieri, 1
> > 43038 Sala Baganza (Parma) IT
> > email: xxxxx@eos.pr.it
> >
> >
> >
> > ----- Original Message -----
> > From: "Don Burn"
> > Newsgroups: ntdev
> > To:
> > Sent: Wednesday, September 15, 2004 4:59 PM
> > Subject: Re: Multiple instances of a driver
> >
> >
> > > You don't do multiple instances of the driver, you create multiple
> device
> > > objects that a single driver manages.
> > >
> > >
> > > --
> > > Don Burn (MVP, Windows DDK)
> > > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > > Remove StopSpam from the email to reply
> > >
> > >
> > >
> > > "Stefano Mora - EOS S.r.l." wrote in message
> > > news:xxxxx@ntdev...
> > > > Hi all,
> > > > i'm writing a serial virtual port and i need to have more than one
> > > instance of
> > > > this driver.
> > > > If i install it more than one time i receive an error (unable to load
> the
> > > > driver).
> > > > How can i resolve ?
> > > > Do i need to write a bus enumerator driver ?
> > > > If yes, Is it separated from the other driver or could be the same one
> ?
> > > >
> > > > Thanks a lot
> > > > --
> > > > Stefano M
> >
> >
> >
>
>
>
No need for table. Each of your device objects has a DeviceExtension.
Store the underlying RealDevObj in the VirtualDevObj's extension. You
have a 1:1 mapping and there is no need to maintain another data
structure.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Stefano Mora -
EOS S.r.l.
Sent: Wednesday, September 15, 2004 8:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Multiple instances of a driver
Thanks Don,
so i must distinguish between different supported port from the
PDEVICE_OBJECT
parameter ?
Since each virtual port has associated a 'real' serial port (or other
driver) by
its relative PDEVICE_OBJECT, i must manage a table like:
VirtualDevObj1 - RealDevObj1
VirtualDevObj2 - RealDevObj2
VirtualDevObj3 - RealDevObj3
and so on ...
to address correctly the requests between ports, is it ?
Is there a suitable data structure to manage this table into a driver ?
Thanks a lot !
Ing. Stefano Mora
EOS S.r.l.
via Lega dei carrettieri, 1
43038 Sala Baganza (Parma) IT
email: xxxxx@eos.pr.it
----- Original Message -----
From: "Don Burn"
Newsgroups: ntdev
To:
Sent: Wednesday, September 15, 2004 4:59 PM
Subject: Re: Multiple instances of a driver
> You don't do multiple instances of the driver, you create multiple
device
> objects that a single driver manages.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
> "Stefano Mora - EOS S.r.l." wrote in message
> news:xxxxx@ntdev...
> > Hi all,
> > i'm writing a serial virtual port and i need to have more than one
> instance of
> > this driver.
> > If i install it more than one time i receive an error (unable to
load the
> > driver).
> > How can i resolve ?
> > Do i need to write a bus enumerator driver ?
> > If yes, Is it separated from the other driver or could be the same
one ?
> >
> > Thanks a lot
> > --
> > Stefano M
---
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
You would stick the pointer to the real port in the extension of the
device object for the virtual port. In fact you should put all per-port
state into the device extension of the virtual port.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
Stefano Mora - EOS S.r.l.
Sent: Wednesday, September 15, 2004 8:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Multiple instances of a driver
Thanks Don,
so i must distinguish between different supported port from
the PDEVICE_OBJECT parameter ?
Since each virtual port has associated a ‘real’ serial port
(or other driver) by its relative PDEVICE_OBJECT, i must
manage a table like:
VirtualDevObj1 - RealDevObj1
VirtualDevObj2 - RealDevObj2
VirtualDevObj3 - RealDevObj3
and so on …
to address correctly the requests between ports, is it ?
Is there a suitable data structure to manage this table into
a driver ?
Thanks a lot !
Ing. Stefano Mora
EOS S.r.l.
via Lega dei carrettieri, 1
43038 Sala Baganza (Parma) IT
email: xxxxx@eos.pr.it
----- Original Message -----
From: “Don Burn”
> Newsgroups: ntdev
> To:
> Sent: Wednesday, September 15, 2004 4:59 PM
> Subject: Re: Multiple instances of a driver
>
>
> > You don’t do multiple instances of the driver, you create
> multiple device
> > objects that a single driver manages.
> >
> >
> > –
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > Remove StopSpam from the email to reply
> >
> >
> >
> > “Stefano Mora - EOS S.r.l.” wrote in message
> > news:xxxxx@ntdev…
> > > Hi all,
> > > i’m writing a serial virtual port and i need to have more than one
> > instance of
> > > this driver.
> > > If i install it more than one time i receive an error
> (unable to load the
> > > driver).
> > > How can i resolve ?
> > > Do i need to write a bus enumerator driver ?
> > > If yes, Is it separated from the other driver or could be
> the same one ?
> > >
> > > Thanks a lot
> > > –
> > > Stefano M
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
(1) Don’t forget to report all the PDOs that you created in
DEVICE_QUERY_DEVICE_RELATIONS. You will then when Windows calls your
AddDevice for all the PDOs and there you create the FDOs. See the Toaster
Sample.
Sincerely;
William Michael Jones
“Peter Wieland” wrote in message
news:xxxxx@ntdev…
You would stick the pointer to the real port in the extension of the
device object for the virtual port. In fact you should put all per-port
state into the device extension of the virtual port.
-p
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
> Stefano Mora - EOS S.r.l.
> Sent: Wednesday, September 15, 2004 8:21 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Multiple instances of a driver
>
> Thanks Don,
> so i must distinguish between different supported port from
> the PDEVICE_OBJECT parameter ?
> Since each virtual port has associated a ‘real’ serial port
> (or other driver) by its relative PDEVICE_OBJECT, i must
> manage a table like:
> VirtualDevObj1 - RealDevObj1
> VirtualDevObj2 - RealDevObj2
> VirtualDevObj3 - RealDevObj3
> and so on …
> to address correctly the requests between ports, is it ?
> Is there a suitable data structure to manage this table into
> a driver ?
>
> Thanks a lot !
> –
> Ing. Stefano Mora
> EOS S.r.l.
> via Lega dei carrettieri, 1
> 43038 Sala Baganza (Parma) IT
> email: xxxxx@eos.pr.it
>
>
>
> ----- Original Message -----
> From: “Don Burn”
> Newsgroups: ntdev
> To:
> Sent: Wednesday, September 15, 2004 4:59 PM
> Subject: Re: Multiple instances of a driver
>
>
> > You don’t do multiple instances of the driver, you create
> multiple device
> > objects that a single driver manages.
> >
> >
> > –
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > Remove StopSpam from the email to reply
> >
> >
> >
> > “Stefano Mora - EOS S.r.l.” wrote in message
> > news:xxxxx@ntdev…
> > > Hi all,
> > > i’m writing a serial virtual port and i need to have more than one
> > instance of
> > > this driver.
> > > If i install it more than one time i receive an error
> (unable to load the
> > > driver).
> > > How can i resolve ?
> > > Do i need to write a bus enumerator driver ?
> > > If yes, Is it separated from the other driver or could be
> the same one ?
> > >
> > > Thanks a lot
> > > –
> > > Stefano M
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Thank a lot,
but when i will create some virtual ports then i will see some icon the the
Device Manager.
When i will want to update the driver, how can i do it ?
Now, i disable the port, substitute the file sys and enable the port. But what
if i have some ports ?
Thanks
Ing. Stefano Mora
EOS S.r.l.
via Lega dei carrettieri, 1
43038 Sala Baganza (Parma) IT
email: xxxxx@eos.pr.it
----- Original Message -----
From: "Stefano Mora - EOS S.r.l."
Newsgroups: ntdev
To:
Sent: Wednesday, September 15, 2004 4:52 PM
Subject: Multiple instances of a driver
> Hi all,
> i'm writing a serial virtual port and i need to have more than one instance of
> this driver.
> If i install it more than one time i receive an error (unable to load the
> driver).
> How can i resolve ?
> Do i need to write a bus enumerator driver ?
> If yes, Is it separated from the other driver or could be the same one ?
>
> Thanks a lot
> --
> Stefano M
>
>
>
(1) When i will want to update the driver, how can i do it ? One way is
from Device Manager, you right click on your device from Device Manage and
then choose Update Driver and then you navigate to your where your driver
package is. Other way is the api UpdateDriverforPlugandPlayDevice(). The
Other way is much more complicated and you do all the work that
UpdateDriverforPlugandPlayDevice() yourself with SetupDi…() calls etc.
(2) Now, i disable the port, substitute the file sys and enable the port.
But what
if i have some ports ? I do not understand this.
Sincerely
William Michael Jones
“Stefano Mora - EOS S.r.l.” wrote in message
news:xxxxx@ntdev…
> Thank a lot,
> but when i will create some virtual ports then i will see some icon the
the
> Device Manager.
> When i will want to update the driver, how can i do it ?
> Now, i disable the port, substitute the file sys and enable the port. But
what
> if i have some ports ?
>
> Thanks
> –
> Ing. Stefano Mora
> EOS S.r.l.
> via Lega dei carrettieri, 1
> 43038 Sala Baganza (Parma) IT
> email: xxxxx@eos.pr.it
>
>
> ----- Original Message -----
> From: “Stefano Mora - EOS S.r.l.”
> Newsgroups: ntdev
> To:
> Sent: Wednesday, September 15, 2004 4:52 PM
> Subject: Multiple instances of a driver
>
>
> > Hi all,
> > i’m writing a serial virtual port and i need to have more than one
instance of
> > this driver.
> > If i install it more than one time i receive an error (unable to load
the
> > driver).
> > How can i resolve ?
> > Do i need to write a bus enumerator driver ?
> > If yes, Is it separated from the other driver or could be the same one ?
> >
> > Thanks a lot
> > –
> > Stefano M
> >
> >
> >
>
>
>
My driver on the AddDevice() function creates two virtual serial port by
IoCreateDevice(), because it is what i want !
So i think that two serial ports will be present on the DeviceManager. I know
well how to update a driver for a single port but i don’t undestand how update
it if it creates more than one port …
–
Ing. Stefano Mora
----- Original Message -----
From: “Michael Jones”
Newsgroups: ntdev
To:
Sent: Friday, September 17, 2004 3:28 PM
Subject: Re: Multiple instances of a driver
> (1) When i will want to update the driver, how can i do it ? One way is
> from Device Manager, you right click on your device from Device Manage and
> then choose Update Driver and then you navigate to your where your driver
> package is. Other way is the api UpdateDriverforPlugandPlayDevice(). The
> Other way is much more complicated and you do all the work that
> UpdateDriverforPlugandPlayDevice() yourself with SetupDi…() calls etc.
>
> (2) Now, i disable the port, substitute the file sys and enable the port.
> But what
> if i have some ports ? I do not understand this.
>
> Sincerely
> William Michael Jones
>
>
> “Stefano Mora - EOS S.r.l.” wrote in message
> news:xxxxx@ntdev…
> > Thank a lot,
> > but when i will create some virtual ports then i will see some icon the
> the
> > Device Manager.
> > When i will want to update the driver, how can i do it ?
> > Now, i disable the port, substitute the file sys and enable the port. But
> what
> > if i have some ports ?
> >
> > Thanks
> > –
> > Ing. Stefano Mora
> > EOS S.r.l.
> > via Lega dei carrettieri, 1
> > 43038 Sala Baganza (Parma) IT
> > email: xxxxx@eos.pr.it
> >
> >
> > ----- Original Message -----
> > From: “Stefano Mora - EOS S.r.l.”
> > Newsgroups: ntdev
> > To:
> > Sent: Wednesday, September 15, 2004 4:52 PM
> > Subject: Multiple instances of a driver
> >
> >
> > > Hi all,
> > > i’m writing a serial virtual port and i need to have more than one
> instance of
> > > this driver.
> > > If i install it more than one time i receive an error (unable to load
> the
> > > driver).
> > > How can i resolve ?
> > > Do i need to write a bus enumerator driver ?
> > > If yes, Is it separated from the other driver or could be the same one ?
> > >
> > > Thanks a lot
> > > –
> > > Stefano M
> > >
> > >
> > >
> >
> >
> >
>
>
>