Disabling/enabling network interfaces via WinAPI

前端 未结 1 2008
陌清茗
陌清茗 2021-01-05 07:10

Here is my attempt to disable/enable network adapters on Windows:

void EnableNetDevice(bool aState, int index)
{
  HDEVINFO NetPnPHandle;
  SP_PROPCHANGE_PAR         


        
1条回答
  •  走了就别回头了
    2021-01-05 07:51

    It's simply a requirement to call the function from a 64-bit process on x64 OS. See http://msdn.microsoft.com/en-us/library/windows/hardware/ff541255(v=vs.85).aspx

    0 讨论(0)
提交回复
热议问题