#ifndef APIPROXY_H_ #define APIPROXY_H_ #pragma warning( disable:4273 ) // Ignore macro redefinition #include #pragma warning( disable:4005 ) // Ignore macro redefinition #define SPYMACRO( x ) FARPROC g_pfn##x; #include "winsock2.inc" #define SAFESTR( x ) ( x ? x : "" ) // Macro that converts null pointers to "" #define SPYCALL( pfn, cArgs ) \ __asm lea edi, [esp - cArgs*4] \ __asm lea esi, [ebp+8] \ __asm mov ecx, cArgs \ __asm rep movsd \ __asm sub esp, cArgs * 4 \ __asm call dword ptr [pfn] \ __asm mov [retValue], EAX #endif