Hello,
I look for a way to change the network binding programmaticaly-
my problem seems to be the same, as jim2005's in the thread:
"How to programmatically set binding order of NDIS miniport adapter on
install?".
So, I took a look at BindView example in WinDDK and what
I do is:
I acquire a write lock using
INetCfgLock->AcquireWriteLock
I enumarate all the components
INetCfgClass->EnumComponents,
and I search for the component I want to put on the top
of the list.
Then I enumarate all the binding paths for the component using:
INetCfgComponentBindings->EnumBindingPaths
For each of the binding path I try to call
INetCfgComponentBindings->MoveBefore
with the second argument = NULL.
However, it gives me an error:
-2147180508
And this is where I stuck :-(
As I'm not very experienced with C++ programming
(I come from the .NET world) I have no clue
where I should go next.
Can anyone give me any suggestion what may be the cause
for the error?
Has anyone ever manage to make a good use of MoveBefore
(or MoveAfter) and would share a snippet of code?
I'll be very grateful - thanks in advance.
Marcin Pytel
--