Results 1 to 4 of 4

Thread: [Win] Problems with PIP_ADAPTER_ADDRESSES

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Win] Problems with PIP_ADAPTER_ADDRESSES

    Ok guys I was trying to fix up this problem, but realised that it is impossible to connect Qt with functions from <iphlpapi.h> maybe with WinAPI at all

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Win] Problems with PIP_ADAPTER_ADDRESSES

    you should take a look at this: http://msdn.microsoft.com/en-us/libr...15(VS.85).aspx.

    You can use WinAPI code in a Qt application without problems.
    PIP_ADAPTER_ADDRESSES is a pointer to IP_ADAPTER_ADDRESSES...maybe you don;t have that defined.

    Anyway, QNetworkInterface already contains the support for getting all the interfaces, although it does not seem to return their friendly names on Windows. For this purpose you can use GetAdaptersAddresses.

  3. #3
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Win] Problems with PIP_ADAPTER_ADDRESSES

    I`ve already known that, I should use this function from MSDN, but I have troubles during working with this function. Ok now I changed PIP_ADAPTER_ADDRESSES to "struct IP_ADAPTER_ADDRESSES* " and I have following errors:
    Qt Code:
    1. qip.cpp: In member function `void QIP::createNetworkList()':
    2. qip.cpp:57: error: `AF_UNSPEC' undeclared (first use this function)
    3. qip.cpp:57: error: (Each undeclared identifier is reported only once for each fu
    4. nction it appears in.)
    5. qip.cpp:57: error: `GAA_FLAG_INCLUDE_PREFIX' undeclared (first use this function
    6. )
    7. qip.cpp:57: error: `GetAdaptersAddresses' undeclared (first use this function)
    8. qip.cpp:57: error: `ERROR_BUFFER_OVERFLOW' undeclared (first use this function)
    9. qip.cpp:59: error: `GetProcessHeap' undeclared (first use this function)
    10. qip.cpp:59: error: `HeapFree' undeclared (first use this function)
    11. qip.cpp:60: error: `HeapAlloc' undeclared (first use this function)
    12. qip.cpp:62: error: `NO_ERROR' undeclared (first use this function)
    13. qip.cpp:68: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
    14. qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
    15. qip.cpp:69: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
    16. qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
    17. mingw32-make[1]: *** [release/qip.o] Error 1
    18. mingw32-make[1]: Leaving directory `C:/Documents and Settings/Bartek/Moje dokume
    19. nty/0.2'
    20. mingw32-make: *** [release] Error 2
    21.  
    22. C:\Documents and Settings\Bartek\Moje dokumenty\0.2>
    To copy to clipboard, switch view to plain text mode 
    I really don`t know what is going on. It seems to doesn`t know anything about declarations from iphlpapi.h and winsock2.h.

Similar Threads

  1. flicker and wierd resize problems ...
    By momesana in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2008, 18:00
  2. canonicalFilePath() thread problems
    By magland in forum Qt Programming
    Replies: 10
    Last Post: 5th December 2007, 21:22
  3. Few general problems
    By Salazaar in forum Newbie
    Replies: 9
    Last Post: 13th June 2007, 22:44
  4. Replies: 2
    Last Post: 8th March 2007, 22:22
  5. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.