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:
qip.cpp: In member function `void QIP::createNetworkList()':
qip.cpp:57: error: `AF_UNSPEC' undeclared (first use this function)
qip.cpp:57: error: (Each undeclared identifier is reported only once for each fu
nction it appears in.)
qip.cpp:57: error: `GAA_FLAG_INCLUDE_PREFIX' undeclared (first use this function
)
qip.cpp:57: error: `GetAdaptersAddresses' undeclared (first use this function)
qip.cpp:57: error: `ERROR_BUFFER_OVERFLOW' undeclared (first use this function)
qip.cpp:59: error: `GetProcessHeap' undeclared (first use this function)
qip.cpp:59: error: `HeapFree' undeclared (first use this function)
qip.cpp:60: error: `HeapAlloc' undeclared (first use this function)
qip.cpp:62: error: `NO_ERROR' undeclared (first use this function)
qip.cpp:68: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
qip.cpp:69: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
mingw32-make[1]: *** [release/qip.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Bartek/Moje dokume
nty/0.2'
mingw32-make: *** [release] Error 2
C:\Documents and Settings\Bartek\Moje dokumenty\0.2>
qip.cpp: In member function `void QIP::createNetworkList()':
qip.cpp:57: error: `AF_UNSPEC' undeclared (first use this function)
qip.cpp:57: error: (Each undeclared identifier is reported only once for each fu
nction it appears in.)
qip.cpp:57: error: `GAA_FLAG_INCLUDE_PREFIX' undeclared (first use this function
)
qip.cpp:57: error: `GetAdaptersAddresses' undeclared (first use this function)
qip.cpp:57: error: `ERROR_BUFFER_OVERFLOW' undeclared (first use this function)
qip.cpp:59: error: `GetProcessHeap' undeclared (first use this function)
qip.cpp:59: error: `HeapFree' undeclared (first use this function)
qip.cpp:60: error: `HeapAlloc' undeclared (first use this function)
qip.cpp:62: error: `NO_ERROR' undeclared (first use this function)
qip.cpp:68: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
qip.cpp:69: error: invalid use of undefined type `struct IP_ADAPTER_ADDRESSES'
qip.h:77: error: forward declaration of `struct IP_ADAPTER_ADDRESSES'
mingw32-make[1]: *** [release/qip.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Bartek/Moje dokume
nty/0.2'
mingw32-make: *** [release] Error 2
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.
Bookmarks