I want to allow my application to dynamically enable and disable bindings of my NDIS 5 IM Protocol Driver to all physical network adapters of the system.
So far, I can disable bindings/binding paths using either INetCfgBindingPath::Enable(FALSE) or INetCfgComponentBindings::UnbindFrom(). However, I could not enable the bindings/binding paths using either INetCfgBindingPath::Enable(TRUE) or INetCfgComponentBindings::BindTo().
INetCfgBindingPath::Enable(FALSE) or INetCfgComponentBindings::UnbindFrom().
- PtUnbindAdapter and MPHalt are called. - OK
- The protocol binding is unchecked in Network Connections Local Area Connection Properties. - OK
INetCfgBindingPath::Enable(TRUE) or INetCfgComponentBindings::BindTo().
3) PtBindAdapter and MPInitialize are NOT called. - NG
4) But the protocol binding is checked in Network Connections Local Area Connection Properties. - OK
Why could be wrong? The notifyobj WDK sample does NOT seem to do anything else before or after enabling the binding paths. Did I miss anything? When I manually check the protocol binding in Network Connections, the virtual network adapter of the NDIS IM is installed and PtBindAdapter and MPInitialize are called.