Programmatically disable/enable network interface

前端 未结 7 987
臣服心动
臣服心动 2020-12-08 11:36

I\'m trying to come up with a solution to programmatically enable/disable the network card - I\'ve done a ton of research and nothing seems to be a workable solution in both

7条回答
  •  猫巷女王i
    2020-12-08 11:46

    after much searching I started to dig into DEVCON. After realizing that those methods had to be pinvokable I did a little search and found this: http://www.codeproject.com/KB/cs/HardwareHelper.aspx

    It helped solve my problem of enabling and disabling the TAP adapter from OpenVPN at least.

提交回复
热议问题