Software only PnP

G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

In article <ugb6JjakEHA.3356@TK2MSFTNGP15.phx.gbl>, "Thomas Johansen"
<thrawn[NO SPAM]@hest.com___KÆP> says...
> 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
markr@hollistech.com
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

>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
markr@hollistech.com
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

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

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

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.

--
Bill McKenzie
Software Engineer - Prism 802.11 Wireless Solutions
Conexant Systems, Inc.


"Thomas Johansen" <thrawn[NO SPAM]@hest.com___KÆP> wrote in message
news:%23WMMv3akEHA.3872@TK2MSFTNGP11.phx.gbl...
> >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
> markr@hollistech.com
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

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






"Calvin Guan" <cguan@pleasenospams.ati.com> wrote in message
news:uyS5ZHckEHA.596@TK2MSFTNGP11.phx.gbl...
> > 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
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.development.device.drivers,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.device_driver.dev (More info?)

the ddk example devcon is great for this.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Thomas Johansen" <thrawn[NO SPAM]@hest.com___KÆP> wrote in message
news:uRrx1B$kEHA.596@TK2MSFTNGP11.phx.gbl...
> 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
>
>
>
>
>
>
> "Calvin Guan" <cguan@pleasenospams.ati.com> wrote in message
> news:uyS5ZHckEHA.596@TK2MSFTNGP11.phx.gbl...
>> > 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
>>
>>
>
>