This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C39A46.3AF7C350
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Is there a way to dynamically unload an IM driver? The only way that I =
know of is to either uninstall the IM driver and then reinstall it (this =
doesn't always work) or to reboot the PC (major pain).

------=_NextPart_000_001F_01C39A46.3AF7C350
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Is there a way to dynamically unload an IM driver? =
The only=20
way that I know of is to either uninstall the IM driver and then =
reinstall it=20
(this doesn't always work) or to reboot the PC (major =
pain).</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_001F_01C39A46.3AF7C350--

RE: Dynamically Loading/Unloading NDIS IM Drivers by bburgin

bburgin
Fri Oct 24 18:00:12 CDT 2003

------=_NextPart_0001_147A0B51
Content-Type: text/plain
Content-Transfer-Encoding: 7bit



I think the only way is to disable the adapter miniport it's bound to. Is
this to make development faster? If it is, and a bit off topic, you might
look at using Mapping Driver Files (look for that topic in Windbg's help
text) that will load your driver under development from your development
machine to the target over the debug cable.

Bryan S. Burgin
bburgin@microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.

------=_NextPart_0001_147A0B51
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20
\par
\par I think the only way is to disable the adapter miniport it's bound to. Is this to make development faster? If it is, and a bit off topic, you might look at using Mapping Driver Files (look for that topic in Windbg's help text) that will load your driver under development from your development machine to the target over the debug cable.
\par
\par Bryan S. Burgin
\par bburgin@microsoft.com
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par }
------=_NextPart_0001_147A0B51--


Re: Dynamically Loading/Unloading NDIS IM Drivers by James

James
Sat Oct 25 10:58:55 CDT 2003

For what it's worth, uninstalling works about 95% of the time. Is your
experience that different?

Peter Gibson wrote:

> Is there a way to dynamically unload an IM driver? The only way that I
> know of is to either uninstall the IM driver and then reinstall it
> (this doesn't always work) or to reboot the PC (major pain).

--
If replying by e-mail, please remove "nospam." from the address.

James Antognini
Windows DDK MVP



Re: Dynamically Loading/Unloading NDIS IM Drivers by Peter

Peter
Sat Oct 25 11:29:31 CDT 2003


"James Antognini" <antognini@mindspring.nospam.com> wrote in message
news:3F9A9DBF.B050D4D7@mindspring.nospam.com...
> For what it's worth, uninstalling works about 95% of the time. Is your
> experience that different?

Yes. I haven't tracked it down yet. I have a DbgBreakPoint() in
DriverEntry(). So, when I uninstall and then reinstall, the breakpoint is
not hit. Unfortunately, the only thing that will always work is to reboot.

>
> Peter Gibson wrote:
>
> > Is there a way to dynamically unload an IM driver? The only way that I
> > know of is to either uninstall the IM driver and then reinstall it
> > (this doesn't always work) or to reboot the PC (major pain).
>
> --
> If replying by e-mail, please remove "nospam." from the address.
>
> James Antognini
> Windows DDK MVP
>
>



Re: Dynamically Loading/Unloading NDIS IM Drivers by somaris

somaris
Sat Oct 25 14:51:33 CDT 2003

Just one hint, although it hasn't got something to do
with your problem:

When developing drivers think of using vmware or *g* the
microsoft virtual PC. Makes it a lot easier!!!

somaris
>-----Original Message-----
>
>"James Antognini" <antognini@mindspring.nospam.com>
wrote in message
>news:3F9A9DBF.B050D4D7@mindspring.nospam.com...
>> For what it's worth, uninstalling works about 95% of
the time. Is your
>> experience that different?
>
>Yes. I haven't tracked it down yet. I have a
DbgBreakPoint() in
>DriverEntry(). So, when I uninstall and then reinstall,
the breakpoint is
>not hit. Unfortunately, the only thing that will always
work is to reboot.
>
>>
>> Peter Gibson wrote:
>>
>> > Is there a way to dynamically unload an IM driver?
The only way that I
>> > know of is to either uninstall the IM driver and
then reinstall it
>> > (this doesn't always work) or to reboot the PC
(major pain).
>>
>> --
>> If replying by e-mail, please remove "nospam." from
the address.
>>
>> James Antognini
>> Windows DDK MVP
>>
>>
>
>
>.
>

Re: Dynamically Loading/Unloading NDIS IM Drivers by Duh

Duh
Wed Oct 29 14:40:00 CST 2003

Peter Gibson wrote:
> "James Antognini" <antognini@mindspring.nospam.com> wrote in message
> news:3F9A9DBF.B050D4D7@mindspring.nospam.com...
>
>>For what it's worth, uninstalling works about 95% of the time. Is your
>>experience that different?
>
>
> Yes. I haven't tracked it down yet. I have a DbgBreakPoint() in
> DriverEntry(). So, when I uninstall and then reinstall, the breakpoint is
> not hit. Unfortunately, the only thing that will always work is to reboot.
>
We've ran this issue. Either because of your Notify object is wrong (or
the system one, if you don't provide Notify Object), either because of
your driver is wrong (PASSTHRU sample IMHO may have bad implementation
example), either this is "one of" NDIS bugs - no matter where, but your
driver image remains in memory after you "uninstall" it. In that case,
of course breakpoint is not hit, new debug print messages wont print, etc.

Solution we found randomly jerking PASSTHRU driver there and back:

When you "UNINSTALL" driver - it would somehow remain in memory.

When you "UNBIND" driver from all of the cards before uninstalling -
after last unbind the system will unload the image. Now you can either
change image binary in the /system32/drivers/ and "BIND" it again or
perform Uninstall (that removes previous installation' registry keys)
and Install your driver back again.


Hope that helps,
Duh.


Re: Dynamically Loading/Unloading NDIS IM Drivers by Stephan

Stephan
Fri Oct 31 11:28:05 CST 2003

Manually disabling *all* underlying NICs (i.e. all NICs that the IM's
protocol is bound to) should do the job *if* your IM properly disables
all of its virtual miniports/adapters by calling
NdisIMDeInitializeDeviceInstance().

Also make sure you call NdisMDeregisterDevice() *before* the call to
MiniportHalt() for the last virtual adapter returns.

Our IM always unloads this way.

Stephan
---
On Fri, 24 Oct 2003 15:48:12 -0700, "Peter Gibson"
<peterg@sj.znet.com> wrote:

>Is there a way to dynamically unload an IM driver? The only way that I know of is to either uninstall the IM driver and then reinstall it (this doesn't always work) or to reboot the PC (major pain).