I have problem with unbinding IM driver from all above and bellow components.
I have tried it by this way:

INetCfgComponent* cfgCompBuff[256];
INetCfgComponent* pncc=NULL;
INetCfgComponentBindings* inetCfgCompBindings = NULL;
INetCfgBindingPath* pncbp=NULL;

hr = pnc->FindComponent(szComponentId, &pncc);

while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
&pncbp, &inetCfgCompBindings)))
{
ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
if(hr == S_OK) {
hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
&celtFetched);
for(i = 0; i < celtFetched; i++) {
hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
}
}
enumCfgComp->Release();
ReleaseObj(pncbp);
}
while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
&pncbp, &inetCfgCompBindings)))
{
ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
if(hr == S_OK) {
hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
&celtFetched);
for(i = 0; i < celtFetched; i++) {
hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
}
}
enumCfgComp->Release();
ReleaseObj(pncbp);
}


Return values from UnbindFrom() functions are S_OK in case that binding exist,
but when I see Properties dialog of unbinded network connection - check box
is still there and IM driver is functional.
What is wrong with that way of unbinding ?

Peter

Re: Problem with UnbindFrom() by Arkady

Arkady
Tue Aug 09 03:19:11 CDT 2005

Did you try to do the same with BindView ( src\network\­config\bindview ) ?
Arkady

"Peter" <Peter@discussions.microsoft.com> wrote in message
news:16F463D4-C494-4CE5-BDBF-AFDCDC71181C@microsoft.com...
>I have problem with unbinding IM driver from all above and bellow
>components.
> I have tried it by this way:
>
> INetCfgComponent* cfgCompBuff[256];
> INetCfgComponent* pncc=NULL;
> INetCfgComponentBindings* inetCfgCompBindings = NULL;
> INetCfgBindingPath* pncbp=NULL;
>
> hr = pnc->FindComponent(szComponentId, &pncc);
>
> while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
> &pncbp, &inetCfgCompBindings)))
> {
> ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
> if(hr == S_OK) {
> hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> &celtFetched);
> for(i = 0; i < celtFetched; i++) {
> hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> }
> }
> enumCfgComp->Release();
> ReleaseObj(pncbp);
> }
> while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
> &pncbp, &inetCfgCompBindings)))
> {
> ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
> if(hr == S_OK) {
> hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> &celtFetched);
> for(i = 0; i < celtFetched; i++) {
> hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> }
> }
> enumCfgComp->Release();
> ReleaseObj(pncbp);
> }
>
>
> Return values from UnbindFrom() functions are S_OK in case that binding
> exist,
> but when I see Properties dialog of unbinded network connection - check
> box
> is still there and IM driver is functional.
> What is wrong with that way of unbinding ?
>
> Peter



Re: Problem with UnbindFrom() by Peter

Peter
Tue Aug 09 13:46:32 CDT 2005

I have tried to write my function with help of bindview sample,
but I met problem. The same problem is if I use bindview.exe:
1. IM driver is installed and bound to four adapters.
2. Start bindview.exe and unbind IM driver-based network service
from all four adapters.
3. Uninstall IM driver (from Properties dialog of some network card)

When I install IM driver again from Properties dialog of Network card,
it seems that it's installed - it's visible in Properties dialog of network
card
but it cannot be opened with CreateFile() and driver is not functional.
To have functional IM driver again I must uninstall it and install it again.
or
after first installing when driver is not functional, rebooting computer
makes it functional.

When I dont use unbinding before uninstalling then uninstalling and
reinstalling is OK
on first attempt.

What can be reason of this behavior ?
Peter


"Arkady Frenkel" wrote:

> Did you try to do the same with BindView ( src\network\­config\bindview ) ?
> Arkady
>
> "Peter" <Peter@discussions.microsoft.com> wrote in message
> news:16F463D4-C494-4CE5-BDBF-AFDCDC71181C@microsoft.com...
> >I have problem with unbinding IM driver from all above and bellow
> >components.
> > I have tried it by this way:
> >
> > INetCfgComponent* cfgCompBuff[256];
> > INetCfgComponent* pncc=NULL;
> > INetCfgComponentBindings* inetCfgCompBindings = NULL;
> > INetCfgBindingPath* pncbp=NULL;
> >
> > hr = pnc->FindComponent(szComponentId, &pncc);
> >
> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
> > &pncbp, &inetCfgCompBindings)))
> > {
> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
> > if(hr == S_OK) {
> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> > &celtFetched);
> > for(i = 0; i < celtFetched; i++) {
> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> > }
> > }
> > enumCfgComp->Release();
> > ReleaseObj(pncbp);
> > }
> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
> > &pncbp, &inetCfgCompBindings)))
> > {
> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
> > if(hr == S_OK) {
> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> > &celtFetched);
> > for(i = 0; i < celtFetched; i++) {
> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> > }
> > }
> > enumCfgComp->Release();
> > ReleaseObj(pncbp);
> > }
> >
> >
> > Return values from UnbindFrom() functions are S_OK in case that binding
> > exist,
> > but when I see Properties dialog of unbinded network connection - check
> > box
> > is still there and IM driver is functional.
> > What is wrong with that way of unbinding ?
> >
> > Peter
>
>
>

Re: Problem with UnbindFrom() by Arkady

Arkady
Wed Aug 10 01:49:50 CDT 2005

Why you need to uninstall , just unbind and bind again , is it not enough ?
Arkady

"Peter" <Peter@discussions.microsoft.com> wrote in message
news:E065E2F3-86A3-44C6-9F60-C82EF06783C1@microsoft.com...
>I have tried to write my function with help of bindview sample,
> but I met problem. The same problem is if I use bindview.exe:
> 1. IM driver is installed and bound to four adapters.
> 2. Start bindview.exe and unbind IM driver-based network service
> from all four adapters.
> 3. Uninstall IM driver (from Properties dialog of some network card)
>
> When I install IM driver again from Properties dialog of Network card,
> it seems that it's installed - it's visible in Properties dialog of
> network
> card
> but it cannot be opened with CreateFile() and driver is not functional.
> To have functional IM driver again I must uninstall it and install it
> again.
> or
> after first installing when driver is not functional, rebooting computer
> makes it functional.
>
> When I dont use unbinding before uninstalling then uninstalling and
> reinstalling is OK
> on first attempt.
>
> What can be reason of this behavior ?
> Peter
>
>
> "Arkady Frenkel" wrote:
>
>> Did you try to do the same with BindView (
>> rc\network\­config\bindview ) ?
>> Arkady
>>
>> "Peter" <Peter@discussions.microsoft.com> wrote in message
>> news:16F463D4-C494-4CE5-BDBF-AFDCDC71181C@microsoft.com...
>> >I have problem with unbinding IM driver from all above and bellow
>> >components.
>> > I have tried it by this way:
>> >
>> > INetCfgComponent* cfgCompBuff[256];
>> > INetCfgComponent* pncc=NULL;
>> > INetCfgComponentBindings* inetCfgCompBindings = NULL;
>> > INetCfgBindingPath* pncbp=NULL;
>> >
>> > hr = pnc->FindComponent(szComponentId, &pncc);
>> >
>> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
>> > &pncbp, &inetCfgCompBindings)))
>> > {
>> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
>> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
>> > if(hr == S_OK) {
>> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
>> > &celtFetched);
>> > for(i = 0; i < celtFetched; i++) {
>> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
>> > }
>> > }
>> > enumCfgComp->Release();
>> > ReleaseObj(pncbp);
>> > }
>> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
>> > &pncbp, &inetCfgCompBindings)))
>> > {
>> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
>> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
>> > if(hr == S_OK) {
>> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
>> > &celtFetched);
>> > for(i = 0; i < celtFetched; i++) {
>> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
>> > }
>> > }
>> > enumCfgComp->Release();
>> > ReleaseObj(pncbp);
>> > }
>> >
>> >
>> > Return values from UnbindFrom() functions are S_OK in case that binding
>> > exist,
>> > but when I see Properties dialog of unbinded network connection - check
>> > box
>> > is still there and IM driver is functional.
>> > What is wrong with that way of unbinding ?
>> >
>> > Peter
>>
>>
>>



Re: Problem with UnbindFrom() by Peter

Peter
Wed Aug 10 01:17:01 CDT 2005

Customer can chose unbind in our product, not in network interface properties
dialog,
and then customer can uninstall product and reinstall it.

But I have tried another experiments and I see that double reinstallation
is often necessary also when I normally do uninstall/reinstall in properties
dialog.
(I have Win2K3+SP1)

Other, more important problem that occures often is that after uninstallation
IM driver cannot be installed without previously reboot, so I must do:
1. uninstall
2. reboot
3. reinstall
After first step - device is not in memory - I can see that it's true in
debugger,
but it's registry key CurrentControlSet\Service\MyIMDriverName
stays after uninstallation. In this state next installation will not help -
IM driver is visible in properties dialog but it cannot be opened with
CreateFile() and it's not functional. The machine must be rebooted and driver
installed again.

Cannot be reason NDISWAN ?
I red some info about ethernet emulation - that this part of NDIS system is
often reason to rebooting.
Have you any tips to solve this ?

Peter

"Arkady Frenkel" wrote:

> Why you need to uninstall , just unbind and bind again , is it not enough ?
> Arkady
>
> "Peter" <Peter@discussions.microsoft.com> wrote in message
> news:E065E2F3-86A3-44C6-9F60-C82EF06783C1@microsoft.com...
> >I have tried to write my function with help of bindview sample,
> > but I met problem. The same problem is if I use bindview.exe:
> > 1. IM driver is installed and bound to four adapters.
> > 2. Start bindview.exe and unbind IM driver-based network service
> > from all four adapters.
> > 3. Uninstall IM driver (from Properties dialog of some network card)
> >
> > When I install IM driver again from Properties dialog of Network card,
> > it seems that it's installed - it's visible in Properties dialog of
> > network
> > card
> > but it cannot be opened with CreateFile() and driver is not functional.
> > To have functional IM driver again I must uninstall it and install it
> > again.
> > or
> > after first installing when driver is not functional, rebooting computer
> > makes it functional.
> >
> > When I dont use unbinding before uninstalling then uninstalling and
> > reinstalling is OK
> > on first attempt.
> >
> > What can be reason of this behavior ?
> > Peter
> >
> >
> > "Arkady Frenkel" wrote:
> >
> >> Did you try to do the same with BindView (
> >> rc\network\­config\bindview ) ?
> >> Arkady
> >>
> >> "Peter" <Peter@discussions.microsoft.com> wrote in message
> >> news:16F463D4-C494-4CE5-BDBF-AFDCDC71181C@microsoft.com...
> >> >I have problem with unbinding IM driver from all above and bellow
> >> >components.
> >> > I have tried it by this way:
> >> >
> >> > INetCfgComponent* cfgCompBuff[256];
> >> > INetCfgComponent* pncc=NULL;
> >> > INetCfgComponentBindings* inetCfgCompBindings = NULL;
> >> > INetCfgBindingPath* pncbp=NULL;
> >> >
> >> > hr = pnc->FindComponent(szComponentId, &pncc);
> >> >
> >> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
> >> > &pncbp, &inetCfgCompBindings)))
> >> > {
> >> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> >> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
> >> > if(hr == S_OK) {
> >> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> >> > &celtFetched);
> >> > for(i = 0; i < celtFetched; i++) {
> >> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> >> > }
> >> > }
> >> > enumCfgComp->Release();
> >> > ReleaseObj(pncbp);
> >> > }
> >> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
> >> > &pncbp, &inetCfgCompBindings)))
> >> > {
> >> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
> >> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
> >> > if(hr == S_OK) {
> >> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
> >> > &celtFetched);
> >> > for(i = 0; i < celtFetched; i++) {
> >> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
> >> > }
> >> > }
> >> > enumCfgComp->Release();
> >> > ReleaseObj(pncbp);
> >> > }
> >> >
> >> >
> >> > Return values from UnbindFrom() functions are S_OK in case that binding
> >> > exist,
> >> > but when I see Properties dialog of unbinded network connection - check
> >> > box
> >> > is still there and IM driver is functional.
> >> > What is wrong with that way of unbinding ?
> >> >
> >> > Peter
> >>
> >>
> >>
>
>
>

Re: Problem with UnbindFrom() by Arkady

Arkady
Wed Aug 10 03:06:57 CDT 2005

The only proposition to tell to client ( show Message/DialogBox ) that the
reboot is must
after uninstall and do it automatically if client agree with it before
uninstall
Arkady

"Peter" <Peter@discussions.microsoft.com> wrote in message
news:AF59AC7F-8A19-49D4-9FCE-27BC74B38FED@microsoft.com...
> Customer can chose unbind in our product, not in network interface
> properties
> dialog,
> and then customer can uninstall product and reinstall it.
>
> But I have tried another experiments and I see that double reinstallation
> is often necessary also when I normally do uninstall/reinstall in
> properties
> dialog.
> (I have Win2K3+SP1)
>
> Other, more important problem that occures often is that after
> uninstallation
> IM driver cannot be installed without previously reboot, so I must do:
> 1. uninstall
> 2. reboot
> 3. reinstall
> After first step - device is not in memory - I can see that it's true in
> debugger,
> but it's registry key CurrentControlSet\Service\MyIMDriverName
> stays after uninstallation. In this state next installation will not
> help -
> IM driver is visible in properties dialog but it cannot be opened with
> CreateFile() and it's not functional. The machine must be rebooted and
> driver
> installed again.
>
> Cannot be reason NDISWAN ?
> I red some info about ethernet emulation - that this part of NDIS system
> is
> often reason to rebooting.
> Have you any tips to solve this ?
>
> Peter
>
> "Arkady Frenkel" wrote:
>
>> Why you need to uninstall , just unbind and bind again , is it not enough
>> ?
>> Arkady
>>
>> "Peter" <Peter@discussions.microsoft.com> wrote in message
>> news:E065E2F3-86A3-44C6-9F60-C82EF06783C1@microsoft.com...
>> >I have tried to write my function with help of bindview sample,
>> > but I met problem. The same problem is if I use bindview.exe:
>> > 1. IM driver is installed and bound to four adapters.
>> > 2. Start bindview.exe and unbind IM driver-based network service
>> > from all four adapters.
>> > 3. Uninstall IM driver (from Properties dialog of some network card)
>> >
>> > When I install IM driver again from Properties dialog of Network card,
>> > it seems that it's installed - it's visible in Properties dialog of
>> > network
>> > card
>> > but it cannot be opened with CreateFile() and driver is not functional.
>> > To have functional IM driver again I must uninstall it and install it
>> > again.
>> > or
>> > after first installing when driver is not functional, rebooting
>> > computer
>> > makes it functional.
>> >
>> > When I dont use unbinding before uninstalling then uninstalling and
>> > reinstalling is OK
>> > on first attempt.
>> >
>> > What can be reason of this behavior ?
>> > Peter
>> >
>> >
>> > "Arkady Frenkel" wrote:
>> >
>> >> Did you try to do the same with BindView (
>> >> rc\network\­config\bindview ) ?
>> >> Arkady
>> >>
>> >> "Peter" <Peter@discussions.microsoft.com> wrote in message
>> >> news:16F463D4-C494-4CE5-BDBF-AFDCDC71181C@microsoft.com...
>> >> >I have problem with unbinding IM driver from all above and bellow
>> >> >components.
>> >> > I have tried it by this way:
>> >> >
>> >> > INetCfgComponent* cfgCompBuff[256];
>> >> > INetCfgComponent* pncc=NULL;
>> >> > INetCfgComponentBindings* inetCfgCompBindings = NULL;
>> >> > INetCfgBindingPath* pncbp=NULL;
>> >> >
>> >> > hr = pnc->FindComponent(szComponentId, &pncc);
>> >> >
>> >> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_BELOW,
>> >> > &pncbp, &inetCfgCompBindings)))
>> >> > {
>> >> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
>> >> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NET, &enumCfgComp);
>> >> > if(hr == S_OK) {
>> >> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
>> >> > &celtFetched);
>> >> > for(i = 0; i < celtFetched; i++) {
>> >> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
>> >> > }
>> >> > }
>> >> > enumCfgComp->Release();
>> >> > ReleaseObj(pncbp);
>> >> > }
>> >> > while (S_OK == (hr = HrGetNextBindingPathToDelete(pncc, EBP_ABOVE,
>> >> > &pncbp, &inetCfgCompBindings)))
>> >> > {
>> >> > ZeroMemory(cfgCompBuff, sizeof(cfgCompBuff));
>> >> > hr = pnc->EnumComponents(&GUID_DEVCLASS_NETTRANS, &enumCfgComp);
>> >> > if(hr == S_OK) {
>> >> > hr = enumCfgComp->Next(256, (INetCfgComponent**)&cfgCompBuff,
>> >> > &celtFetched);
>> >> > for(i = 0; i < celtFetched; i++) {
>> >> > hr = inetCfgCompBindings->UnbindFrom(cfgCompBuff[i]);
>> >> > }
>> >> > }
>> >> > enumCfgComp->Release();
>> >> > ReleaseObj(pncbp);
>> >> > }
>> >> >
>> >> >
>> >> > Return values from UnbindFrom() functions are S_OK in case that
>> >> > binding
>> >> > exist,
>> >> > but when I see Properties dialog of unbinded network connection -
>> >> > check
>> >> > box
>> >> > is still there and IM driver is functional.
>> >> > What is wrong with that way of unbinding ?
>> >> >
>> >> > Peter
>> >>
>> >>
>> >>
>>
>>
>>