calling DriverEntry explicitely

D M wrote:

Is it possible to call DriverEntry of some other driver I am attached
to from inside my own DriverEntry?

Why would you want to? DriverEntry gets called automatically when a
driver loads. It is allowed to assume that it is called only once in
the lifetime of the driver.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

DriverEntry is assumed to be called once for a driver when it is loaded.
While technically you could call it, there are simpler and cleaner ways to
crash the operating system.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

“D M” wrote in message news:xxxxx@ntdev…

Is it possible to call DriverEntry of some other driver I am attached to
from inside my own DriverEntry?

In the past the SCSI disk class driver did this to re-initialize the
SCSI bus after it detected a new device was available; with the advent
of PnP this isn’t necessary (or useful) any longer.

Driver Entry is nothing more (or less) than a function. If you want to
call it again, you can do so (although as Jamey points out, that assumes
it is still in memory and hasn’t been discarded.) Of course, like
anything unusual, it is your responsibility to ensure that you handle
the various conditions that might arise here correctly.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com http:</http:>


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of D M
Sent: Monday, August 29, 2005 1:26 PM
To: ntdev redirect
Subject: [ntdev] calling DriverEntry explicitely

Is it possible to call DriverEntry of some other driver I am attached to
from inside my own DriverEntry?

http:ignature-home.htm/xxxxx@Middle5?PARTNER=3> — Questions? First
check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed
to ntdev as: unknown lmsubst tag argument: ‘’ To unsubscribe send a
blank email to xxxxx@lists.osr.com</http:>

(god I hate these assinine WEB email systems that append these god damned
advertisements to email. But then I think HTML has no place in a forum
anyway.)

If you own both drivers, and you write the DriverEntry routines to allow
that, then the answer is an un-qualified yes. But if you call one of my
drivers, and your system crashes, my response to your trouble report will be
an unqualified “Don’t do that!”.


The personal opinion of
Gary G. Little

“D M” wrote in message news:xxxxx@ntdev…

Is it possible to call DriverEntry of some other driver I am attached to
from inside my own DriverEntry?

On Mon, 29 Aug 2005 13:39:08 -0400, Don Burn wrote:

DriverEntry is assumed to be called once for a driver when it is loaded.
While technically you could call it, there are simpler and cleaner ways to
crash the operating system.

LOL! Thanks for the Monday afternoon chuckle

If you own the drivers, export DriverEntry and call it like a DLL. If you DON’T own the driver, then that is all the MORE reason NOT to call it.


Gary G. Little
“D M” wrote in message news:xxxxx@ntdev…

Gary, and All others,

thanks of the responses you sent. Well, if I want to actually make the call, provided, I own both drivers, and also the DriverEntry code is not discarded using compiler settings, then is the call going to be something like

FooDeviceObject->DriverEntry(param1,Param2);

On Tue, 30 Aug 2005 Gary G.Little wrote :
>(god I hate these assinine WEB email systems that append these god damned
>advertisements to email. But then I think HTML has no place in a forum
>anyway.)
>
>If you own both drivers, and you write the DriverEntry routines to allow
>that, then the answer is an un-qualified yes. But if you call one of my
>drivers, and your system crashes, my response to your trouble report will be
>an unqualified “Don’t do that!”.
>
>–
>The personal opinion of
>Gary G. Little
>
>“D M” wrote in message news:xxxxx@ntdev…
>
>Is it possible to call DriverEntry of some other driver I am attached to
> from inside my own DriverEntry?
>
>
>
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@rediffmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com