[python-win32] Network Bindings

Matt Herbert matherbe at cisco.com
Fri Sep 28 19:31:52 CEST 2007


Hello all,

I've been trying to figure out how to change the bindings on a network 
adapter. I've used Google extensively and haven't found anything useful 
(or I haven't been searching for the right things).

What I have found, leads me to believe that the only way to do this is 
via the INetCfg Interface 
(http://msdn2.microsoft.com/en-us/library/ms805265.aspx). It seems as
though nobody out there has actually used this interface with python yet.

So according to the MSDN docs, the interface is already implemented in
netcfgx.dll. So I thought I would just use ctypes, and access it that
way. But I took a look at the netcfgx.h file and got scared. I'm not a
very competent C/C++ programmer (only dable here and there) and that
header file has things I don't understand.

Which has lead me to the path of building the interface via comtypes 
(because pythoncom cannot support arbitrary interfaces). This seems like 
it's going to be a lot of work, for what I want to achieve: being able 
to change binding paths for a network adapter.

So I'm wondering, if anybody out there knows of an easier way this can 
be accomplished?

-Matt


More information about the python-win32 mailing list