Multiple Instances of a Kernel-mode Service.

Hi,

I have a kernel mode service registered with the service control manager.
When I start the service only one instance of the driver will be loaded.
Can I have multiple instances of a single kernel-mode service, where i can
have multiple device names and open it from user space (like
\Device\Inst1, \Device\Inst2, …)?

Thanks In Advance.

No. But your ‘service’ (its really a driver,) can create multiple named
device objects and you can use those individual device objects to perform
whatever it was that you thought multiple instances would do for you.

-----Original Message-----
From: Naveen Mellempudi [mailto:xxxxx@wipro.com]
Sent: Wednesday, April 03, 2002 8:25 AM
To: NT Developers Interest List
Subject: [ntdev] Multiple Instances of a Kernel-mode Service.

Hi,

I have a kernel mode service registered with the service
control manager. When I start the service only one instance
of the driver will be loaded. Can I have multiple instances
of a single kernel-mode service, where i can have multiple
device names and open it from user space (like \Device\Inst1,
\Device\Inst2, …)?

Thanks In Advance.


You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%

Thanks mark …
my requirement is to create a device object on user request … ie in an
IOCTL routine. when i tried this somehow i was not able to open it from
the user application…when i created the same in driver entry i was able
to access it.
how is this explained ???

Thanks in advance.
-Naveen

No. But your ‘service’ (its really a driver,) can create multiple named
device objects and you can use those individual device objects to perform
whatever it was that you thought multiple instances would do for you.

Try handing the device object create request off to a system worker
thread.

=====================
Mark Roddy
Windows XP/2000/NT Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Naveen
Mellempudi
Sent: Thursday, April 04, 2002 1:24 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Multiple Instances of a Kernel-mode Service.

Thanks mark …
my requirement is to create a device object on user request
… ie in an IOCTL routine. when i tried this somehow i was
not able to open it from the user application…when i created
the same in driver entry i was able to access it. how is this
explained ???

Thanks in advance.
-Naveen

> No. But your ‘service’ (its really a driver,) can create multiple
> named device objects and you can use those individual
device objects
> to perform whatever it was that you thought multiple
instances would
> do for you.
>
>
>


You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
%%email.unsub%%

“Naveen Mellempudi” wrote in message
news:xxxxx@ntdev…
>
> my requirement is to create a device object on user request … ie in an
> IOCTL routine. when i tried this somehow i was not able to open it from
> the user application…when i created the same in driver entry i was able
> to access it.
> how is this explained ???
>

Did you perhaps forget to clear DO_DEVICE_INITIALIZING after creating the
device object? It’s cleared automagically after leaving DriverEntry, but if
create a device object any other place, you need to clear it manually…

Peter
OSR

Clean the DO_DEVICE_INITIALIZING flag manually.
Device objects created in DriverEntry do not need this. Device objects created in any other code paths do need.

Max

----- Original Message -----
From: “Naveen Mellempudi”
To: “NT Developers Interest List”
Sent: Thursday, April 04, 2002 10:24 AM
Subject: [ntdev] RE: Multiple Instances of a Kernel-mode Service.

> Thanks mark …
> my requirement is to create a device object on user request … ie in an
> IOCTL routine. when i tried this somehow i was not able to open it from
> the user application…when i created the same in driver entry i was able
> to access it.
> how is this explained ???
>
> Thanks in advance.
> -Naveen
>
>
>
> > No. But your ‘service’ (its really a driver,) can create multiple named
> > device objects and you can use those individual device objects to perform
> > whatever it was that you thought multiple instances would do for you.
> >
> >
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>