setup nic-settings

  • Thread starter Thread starter christian
  • Start date Start date
C

christian

Hello,

I'm trying to set up my network properties e.g. my IP.

Has anybody tried this, and what did you in that case do?
That iphlp-library looks as it has stuff for getting, but not setting, the IP.

Please give me a hint, a snippet or a clue as to what api to use.


Best Regards,
Christian Sternell
 
Christian,

I think that what you will want to do is use the System.Management
namespace. If you get the instances of the Win32_NetworkAdapter and
Win32_NetworkAdapterConfiguration WMI classes, you should then be able to
set the properties on the adapter (such as IP address) through the indexer
(which is the Item property) of the ManagementObject representing the WMI
classes.

Hope this helps.
 
Back
Top