Loading driver at boot time

Hi ,

I have written a driver which i load dynamically, but is it possible for me to load the driver at boot time .

thanks in advance

regards,
Arun

Assuming your driver does not do anything like trying to access registry
data, files or other devices that are not present at boot time, the driver
will run. Change the start type to 0.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
> Hi ,
>
> I have written a driver which i load dynamically, but is it possible for
> me to load the driver at boot time .
>
> thanks in advance
>
> regards,
> Arun
>

Well perhaps, but you might want to explain exactly what you mean by ‘load
dynamically’. Obviously if this is ‘my application starts the driver using
user mode apis’ then the answer is ‘no’.

On Sat, Jun 21, 2008 at 3:15 AM, wrote:

> Hi ,
>
> I have written a driver which i load dynamically, but is it possible for me
> to load the driver at boot time .
>
> thanks in advance
>
> regards,
> Arun
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

>Obviously if this is ‘my application starts the driver using user mode apis’ then the answer is ‘no’.

Why not??? After all, a driver itself should not worry about its start type. What it should worry about is availability of services that its DriverEntry() relies upon. As long as his driver’s entry point does not make any calls that are related to FS, registry and other services that are not yet available at the early stage of a boot process, its start type can be changed to 0 or 1, which are basically the same. The only difference between them is that the former ones get loaded into RAM before ntoskrnl.exe does in order to avoid interdependence that would arise it ntoskrnl.exe was to load it… However, its DriverEntry() may get called only after IO Manager gets initialized - after it happens, all drivers of start type 0 and 1 *actually* start running…

Anton Bassov

Because the OP specifically asked if he could load his driver dynamically at
boot time, not if he could simply make his driver load at boot time. Of
course he can make his driver a boot start driver, but that was not the
problem that he stated. That is why I restated his problem as I understood
it.

On Mon, Jun 23, 2008 at 7:02 AM, wrote:

> >Obviously if this is ‘my application starts the driver using user mode
> apis’ then the answer is ‘no’.
>
> Why not??? After all, a driver itself should not worry about its start
> type. What it should worry about is availability of services that its
> DriverEntry() relies upon. As long as his driver’s entry point does not make
> any calls that are related to FS, registry and other services that are not
> yet available at the early stage of a boot process, its start type can be
> changed to 0 or 1, which are basically the same. The only difference between
> them is that the former ones get loaded into RAM before ntoskrnl.exe does in
> order to avoid interdependence that would arise it ntoskrnl.exe was to load
> it… However, its DriverEntry() may get called only after IO Manager gets
> initialized - after it happens, all drivers of start type 0 and 1 actually
> start running…
>
> Anton Bassov
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy