Driver unloading.

Hi!

For example, we have a simple driver which can be unloaded dynamically.
Is it enough to send IRP_MJ_CLOSE from user mode to unload driver from memory
automatically? Unload routine is set.

Thanks.

Sergey.

No, use “net stop <your_driver>” instead. Also, you can use appropriate SCM
APIs. Note that driver unload routine is called only if driver isn’t
referenced i.e. all handles to its devices are closed.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]

> ----------
> From: Sergey Kipnis[SMTP:xxxxx@twins.com.pl]
> Reply To: NT Developers Interest List
> Sent: Monday, October 02, 2000 8:58 PM
> To: NT Developers Interest List
> Subject: [ntdev] Driver unloading.
>
> Hi!
>
> For example, we have a simple driver which can be unloaded dynamically.
> Is it enough to send IRP_MJ_CLOSE from user mode to unload driver from
> memory
> automatically? Unload routine is set.
>
> Thanks.
>
> Sergey.
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
></your_driver>

No.

In NT4, call ControlService to stop it.
In w2k, use SetupDi functions to disable the devnodes controlled by it. It
will be unloaded when all devnodes are gone.

Max

----- Original Message -----
From: “Sergey Kipnis”
To: “NT Developers Interest List”
Sent: Monday, October 02, 2000 10:58 PM
Subject: [ntdev] Driver unloading.

> Hi!
>
> For example, we have a simple driver which can be unloaded dynamically.
> Is it enough to send IRP_MJ_CLOSE from user mode to unload driver from
memory
> automatically? Unload routine is set.
>
> Thanks.
>
> Sergey.
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>