In order to compile, with VC++ .NET 2003 and be able to run on older Windows versions, you need to add the following lines at the end of the "wspiapi.h" file.
You can find "wspiapi.h" here:
(Drive-letter you installed VC++):\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include
Lines to add are in the CODE window.
Code:
// Workaround for missing DLL entries
#define GetAddrInfoW _GetAddrInfoW
#define FreeAddrInfoW _FreeAddrInfoW
__inline
int
WSAAPI
_GetAddrInfoW(
IN PCWSTR pNodeName,
IN PCWSTR pServiceName,
IN const ADDRINFOW * pHints,
OUT PADDRINFOW * ppResult
)
{
return getaddrinfo(CStringA(pNodeName), CStringA(pServiceName), reinterpret_cast<const ADDRINFOA *>(pHints), reinterpret_cast<addrinfo **>(ppResult));
}
__inline
void
WSAAPI
_FreeAddrInfoW(
IN PADDRINFOW pAddrInfo
)
{
freeaddrinfo(reinterpret_cast<addrinfo *>(pAddrInfo));
}
The patched "wspiapi.h" file has to be used only for compilation of the EMule project. Other sub-projects of EMule, especially the upnplib project, don't compile at all or don't need to be compiled with the patched version "wspiapi.h".
Ciao
Rumpelzuck