Problem with UnbindFrom()
- From: "Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Aug 2005 23:56:05 -0700
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
.
- Follow-Ups:
- Re: Problem with UnbindFrom()
- From: Arkady Frenkel
- Re: Problem with UnbindFrom()
- Prev by Date: Re: Unplug the usb power cause a system crash in winxp+sp2
- Next by Date: Re: about device install error
- Previous by thread: Event Notifications from Stream Class Minidriver
- Next by thread: Re: Problem with UnbindFrom()
- Index(es):
Relevant Pages
|
Loading