How to control network bindings

Hi everyone,
I am trying to figure out a way to control network protocol bindings from a
notification object.

I have an NDIS intermediate driver which binds to n physical adapters and
expose 1 virtual adapter. I need to Unbind all other network components
which are bound to the physical adapters and only allow bindings to the
virtual adapter.

So far in my notification object, I enumerate through all GUID_DEVCLASS_NET
component. If component is one or our adapters, I issue
INetCfgComponentBindings::UnbindFrom(INetCfgComponent) but this call is
failing. As a matter of fact, all INetCfgComponentBinding calls
(IsBoundTo, BindTo,…) return S_FALSE.

What is the correct way to control network bindings? If a user double
click on the box and forces a binding path, how do I unbind it and reset
the box?

I have also tried returning a status of NETCFG_S_DISABLE_QUERY in reply to
QueryBindingPath and SysQueryBindingPath. This appears to have the desired
effect but no bindings are created for the virtual adapter. If I do
‘properties’ from Network and Dial-up connections after selecting the
virtual adapter, explorer.exe crashes. Windbg displayed the following

0:NETCFG *ERROR*: LAN conection has no matching INetCfgComponent for the
adapter !!!
0:NETCFG *ERROR*: GUID = {D1B0E9F0-DF48-4F84-9254-09FDC038273F}

I noticed in the sample driver the use of NdisReEnumerateProtocolBindings.
Somehow, I think this might be pertinent but I can’t find this call
documented anywhere.

Any help would be greatly appreciated.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)