Software only PnP

  • Thread starter Thomas Johansen
  • Start date
T

Thomas Johansen

Hi

I have a legacy kernel driver, that uses the a COM port (serial.sys). Its
works OK and application can acces it as they schould.

Now I would like to make the driver know, if the system is restarting or
shutting down. To get this information, it must be a PnP driver. Is that
right ?

I then have to add a XXXAddDevice and a XXXDispatchPnp major function in my
DriverEntry. XXXAddDevice now has to performe some of hte task done by
DriverEntry, e.g. creating symbolic link etc.

But the driver has no actual HW device attached to it, so its a software
only device driver, so i guess it schould be software enumerated by the PnP.

I whant the driver to be started by the system somewhere in the boot phase
(After the serial driver has been started), just like the legacy version do.

Do I need to add something in the registry to do this ?

If I try to start my driver manualy, after boot up is done, my XXXUnload is
called just after DriverEntry is finished, with following message in the
system log:

"The service cannot be started, either because it is disabled or because it
has no enabled devices associated with it. " ID event: 7000

So my XXXAddDevice never gets called.

How do I get the PnP to start this driver and accept, that there is no
device associated with it ?

Thomas
 
M

Mark Roddy

"Thomas Johansen" said:
Hi

I have a legacy kernel driver, that uses the a COM port (serial.sys). Its
works OK and application can acces it as they schould.

Now I would like to make the driver know, if the system is restarting or
shutting down. To get this information, it must be a PnP driver. Is that
right ?

I then have to add a XXXAddDevice and a XXXDispatchPnp major function in my
DriverEntry. XXXAddDevice now has to performe some of hte task done by
DriverEntry, e.g. creating symbolic link etc.

But the driver has no actual HW device attached to it, so its a software
only device driver, so i guess it schould be software enumerated by the PnP.

I whant the driver to be started by the system somewhere in the boot phase
(After the serial driver has been started), just like the legacy version do.

Do I need to add something in the registry to do this ?

If I try to start my driver manualy, after boot up is done, my XXXUnload is
called just after DriverEntry is finished, with following message in the
system log:

"The service cannot be started, either because it is disabled or because it
has no enabled devices associated with it. " ID event: 7000

So my XXXAddDevice never gets called.

How do I get the PnP to start this driver and accept, that there is no
device associated with it ?

Thomas

Make it a 'root enumerated' pnp device. See the toaster samples in the
ddk, they are all 'software only' devices. You will get started during
the system initialization phase.

--

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
(e-mail address removed)
 
T

Thomas Johansen

Make it a 'root enumerated' pnp device. See the toaster samples in the
ddk, they are all 'software only' devices. You will get started during
the system initialization phase.

I think there is something I dont understand ??

What spedific schould I look at in the toaster sample?

So I have to have a inf file for my driver ? and af Hardware ID ?

Where to put the hardware ID ? and what ?

I need to develop and debug my driver, so I can't understand, why it schould
be so difficult to start and stop that driver running under windows.

Any "buzz" word i can use to search for more information.

Thomas



--

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
(e-mail address removed)
 
C

Calvin Guan

What spedific schould I look at in the toaster sample?

The functional driver.
So I have to have a inf file for my driver ? and af Hardware ID ?

Yes, you do.
Where to put the hardware ID ?

In the models section of the INF file.
and what ?

root\yourdriver for example.
Any "buzz" word i can use to search for more information.

You may also take a look at the portio sample in DDK. It's a minimal PNP
driver, easier to start with IMO.

HTH,
Calvin
-
Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com
 
B

Bill McKenzie

I would suggest you buy a good book on WDM drivers. Walter Oney's
"Programming the Windows Driver Model 2nd Ed" is a good one in my opinion.
This book will likely answer most of your questions.
 
T

Thomas Johansen

Thanks Calvin.. that helped.

But how do I start and stop the PnP driver runtime, so I can debug the
driver ?

Any good tool you know ?

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top