LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

netsh commands in Windows SDK?

My PC has two network adapter cards and I need to implement a test that disables each of them individually. Is there a way to do the equivalent of these commands...

 

netsh interface show interface

netsh interface set interface "Local Area Connection" ENABLED

 

...using Windows SDK function calls?  The only other way I know would be to run the commands using system() or LaunchExecutable, dump the results to an output file, and parse the file to see the results.  I'd rather be able to do it a neater way.

0 Kudos
Message 1 of 2
(4,106 Views)

Hi richferrara,

 

You may get some more feedback on the Windows API functions by posting in the Microsoft Developer Network forums. There appears to be an Enable/Disable network card forum on the MSDN that describes several solutions to trying to implement this action.

 

In addition, on StackOverflow there is a fairly thorough discussion of trying to perform this action in a forum titled Programatically disable/enable network interface that discusses the complexities of platform specific implementations and behaviors of this functionality.


Milan
0 Kudos
Message 2 of 2
(4,084 Views)