
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.emule-web.de/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.emule-web.de/Special:LongPages?action=history&amp;feed=atom&amp;title=Netfinity_Patch</id>
		<title>Netfinity Patch - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.emule-web.de/Special:LongPages?action=history&amp;feed=atom&amp;title=Netfinity_Patch"/>
		<link rel="alternate" type="text/html" href="https://wiki.emule-web.de?title=Netfinity_Patch&amp;action=history"/>
		<updated>2026-04-18T11:02:14Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.1</generator>

	<entry>
		<id>https://wiki.emule-web.de?title=Netfinity_Patch&amp;diff=1457&amp;oldid=prev</id>
		<title>Leuk he: New page: == edit wspiapiu.h ==  A mod based compiled with VS.Net 2003 cannot run without this fix on Microsoft WindowsXP without SP2 installed. This is an official bug in Windows and has to do with...</title>
		<link rel="alternate" type="text/html" href="https://wiki.emule-web.de?title=Netfinity_Patch&amp;diff=1457&amp;oldid=prev"/>
				<updated>2007-03-15T10:33:58Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == edit wspiapiu.h ==  A mod based compiled with VS.Net 2003 cannot run without this fix on Microsoft WindowsXP without SP2 installed. This is an official bug in Windows and has to do with...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== edit wspiapiu.h ==&lt;br /&gt;
&lt;br /&gt;
A mod based compiled with VS.Net 2003 cannot run without this fix on Microsoft WindowsXP without SP2 installed. This is an official bug in Windows and has to do with the Windows dll WS2_32.dll.&lt;br /&gt;
&lt;br /&gt;
Without the patch the application will not start and display the the following error message:&lt;br /&gt;
&lt;br /&gt;
  The procedure entry point &amp;quot;FreeAddrInfoW&amp;quot; in &amp;quot;WS2_32.dll&amp;quot; could no be found&lt;br /&gt;
&lt;br /&gt;
e.g. the Webcache-Mod has in version 2.0a Beta 1 not been compiled with the NetF patch.&lt;br /&gt;
&lt;br /&gt;
The patched &amp;quot;wspiapi.h&amp;quot; file has to be used only for compilation of the eMule project. Other sub-projects of eMule, especially the upnplib project (C-based), won't compile at all or don't need to be compiled with the patched version &amp;quot;wspiapi.h&amp;quot;, see below for the patch for such C-programs.&lt;br /&gt;
&lt;br /&gt;
In order to compile with VC++ .NET 2003 and to be able to run on older Windows versions, you need to add the following lines at the end of the &amp;quot;wspiapi.h&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
You can find &amp;quot;wspiapi.h&amp;quot; here: (Drive-letter you installed VC++):\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The patch=== &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Workaround for missing DLL entries&lt;br /&gt;
#define GetAddrInfoW _GetAddrInfoW&lt;br /&gt;
#define FreeAddrInfoW _FreeAddrInfoW&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__inline&lt;br /&gt;
int&lt;br /&gt;
WSAAPI&lt;br /&gt;
_GetAddrInfoW(&lt;br /&gt;
IN PCWSTR pNodeName,&lt;br /&gt;
IN PCWSTR pServiceName,&lt;br /&gt;
IN const ADDRINFOW * pHints,&lt;br /&gt;
OUT PADDRINFOW * ppResult&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
return getaddrinfo(CStringA(pNodeName), CStringA(pServiceName), reinterpret_cast&amp;lt;const ADDRINFOA *&amp;gt;(pHints),    reinterpret_cast&amp;lt;addrinfo **&amp;gt;(ppResult));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
__inline&lt;br /&gt;
void&lt;br /&gt;
WSAAPI&lt;br /&gt;
_FreeAddrInfoW(&lt;br /&gt;
IN PADDRINFOW pAddrInfo&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
freeaddrinfo(reinterpret_cast&amp;lt;addrinfo *&amp;gt;(pAddrInfo));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The patch for C programs&lt;br /&gt;
&lt;br /&gt;
A workaround so C programs (like the UPnP library...) can still compile with this include file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
// start netf patch&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
__inline&lt;br /&gt;
int&lt;br /&gt;
WSAAPI&lt;br /&gt;
_GetAddrInfoW(&lt;br /&gt;
IN PCWSTR pNodeName,&lt;br /&gt;
IN PCWSTR pServiceName,&lt;br /&gt;
IN const ADDRINFOW * pHints,&lt;br /&gt;
OUT PADDRINFOW * ppResult&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
return getaddrinfo(CStringA(pNodeName), CStringA(pServiceName), reinterpret_cast&amp;lt;const ADDRINFOA *&amp;gt;(pHints),    reinterpret_cast&amp;lt;addrinfo **&amp;gt;(ppResult));&lt;br /&gt;
#else &lt;br /&gt;
return getaddrinfo((TCHAR *)pNodeName,(TCHAR *) pServiceName, reinterpret_cast&amp;lt;const ADDRINFOA *&amp;gt;(pHints),    reinterpret_cast&amp;lt;addrinfo **&amp;gt;(ppResult));&lt;br /&gt;
#endif&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__inline&lt;br /&gt;
void&lt;br /&gt;
WSAAPI&lt;br /&gt;
_FreeAddrInfoW(&lt;br /&gt;
IN PADDRINFOW pAddrInfo&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
freeaddrinfo(reinterpret_cast&amp;lt;addrinfo *&amp;gt;(pAddrInfo));&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
// end netf patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
developed by : Netfinity&lt;br /&gt;
AKA: NetF-Fix, WS2_32.dll-Workaround&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
Simply adding WS2_32.dll to Project-&amp;gt;emule properties-&amp;gt;Linker-&amp;gt;Input-&amp;gt;Delay Loaded DLLs will allow you to start your application [source (http://forum.emule-project.net/index.php?showtopic=103239&amp;amp;view=findpost&amp;amp;p=734988)] BUT if you ever send a notification eMail then your application will crash. Best solution in case you don't even need the eMail support is to compile without the HAVE_SAPI pre-processor macro.&lt;br /&gt;
&lt;br /&gt;
== SP1 ==&lt;br /&gt;
&lt;br /&gt;
MS also supplied a fix for this in vs2003 sp1. http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=69d2219f-ce82-46a5-8aec-072bd4bb955e#QuickInfoContainer http://support.microsoft.com/kb/909141/ &lt;br /&gt;
&lt;br /&gt;
[[category:howto]]&lt;/div&gt;</summary>
		<author><name>Leuk he</name></author>	</entry>

	</feed>