I have a problem fething the machines local IP address. I don´t seem to find any network API suitable. I know that it can be fetched from "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\..." but can´t be used in my situation.
/*
Confirm that the WinSock DLL supports 2.0.
Note that if the DLL supports versions greater
than 2.0 in addition to 2.0, it will still return
2.0 in wVersion since that is the version we
requested.
*/
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 0 )
{
/* couldn't find a usable WinSock DLL. */
WSACleanup( );
return WSAVERNOTSUPPORTED;
}
/* The WinSock DLL is acceptable */
return 0;
}
You can go through good old winsock to obtain your local IP address. Mike L.G.
mlg400@linuxmail.org
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.