CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    15

    disable a device in PIP_ADAPTER_ADDRESSES

    Hi,
    I am calling GetAdaptersAddresses to get a PIP_ADAPTER_ADDRESSES structure in which I would loop through that list and check the status of the adapter, if the adapter is 'up' I would like to be able to disable it.
    ie. (very rough example)
    PIP_ADAPTER_ADDRESSES p;
    GetAdaptersAddresses(AF_INET, dwFlags, NULL, p, &dwSize);
    if ( p->OperStatus == IfOperStatusUp )
    {
    //put code here to disable device
    }

    from the PIP_ADAPTER_ADDRESSES structure I can use the p->AdapterName which is the interface guid for the network device however I cant seem to find a way to hook this guid or any info in the PIP_ADAPTER_ADDRESSES structure to disable that device.

  2. #2
    Join Date
    May 2010
    Posts
    33

    Re: disable a device in PIP_ADAPTER_ADDRESSES


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured