aboutsummaryrefslogtreecommitdiff
path: root/src/win32_compatibility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32_compatibility.cpp')
-rw-r--r--src/win32_compatibility.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/win32_compatibility.cpp b/src/win32_compatibility.cpp
index e7710e5..54fd56c 100644
--- a/src/win32_compatibility.cpp
+++ b/src/win32_compatibility.cpp
@@ -8,12 +8,10 @@ int DynamicWinsock2::WSAStartup(
8{ 8{
9 int out=0; 9 int out=0;
10 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL")); 10 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL"));
11 printf("ws2_32 dll: %08x\n", (int) Ws2_32);
12 if( Ws2_32 != NULL ) 11 if( Ws2_32 != NULL )
13 { 12 {
14 FNDEF_DYN_WSAStartup fn = (FNDEF_DYN_WSAStartup) 13 FNDEF_DYN_WSAStartup fn = (FNDEF_DYN_WSAStartup)
15 GetProcAddress( Ws2_32, "WSAStartup" ); 14 GetProcAddress( Ws2_32, "WSAStartup" );
16 printf("WSAStartup function pointer: %08x\n", (int)fn);
17 if( fn != NULL ) 15 if( fn != NULL )
18 out = (fn)(wVersionRequested,lpWSAData); 16 out = (fn)(wVersionRequested,lpWSAData);
19 } 17 }
@@ -25,12 +23,10 @@ int DynamicWinsock2::WSACleanup()
25{ 23{
26 int out=0; 24 int out=0;
27 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL")); 25 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL"));
28 printf("ws2_32 dll: %08x\n", (int) Ws2_32);
29 if( Ws2_32 != NULL ) 26 if( Ws2_32 != NULL )
30 { 27 {
31 FNDEF_DYN_WSACleanup fn = (FNDEF_DYN_WSACleanup) 28 FNDEF_DYN_WSACleanup fn = (FNDEF_DYN_WSACleanup)
32 GetProcAddress( Ws2_32, "WSACleanup" ); 29 GetProcAddress( Ws2_32, "WSACleanup" );
33 printf("WSACleanup function pointer: %08x\n", (int)fn);
34 if( fn != NULL ) 30 if( fn != NULL )
35 out = (fn)(); 31 out = (fn)();
36 } 32 }
@@ -43,12 +39,10 @@ int DynamicWinsock2::WSAGetLastError()
43{ 39{
44 int out=0; 40 int out=0;
45 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL")); 41 HINSTANCE Ws2_32 = LoadLibrary(TEXT("WS2_32.DLL"));
46 printf("ws2_32 dll: %08x\n", (int) Ws2_32);
47 if( Ws2_32 != NULL ) 42 if( Ws2_32 != NULL )
48 { 43 {
49 FNDEF_DYN_WSAGetLastError fn = (FNDEF_DYN_WSAGetLastError) 44 FNDEF_DYN_WSAGetLastError fn = (FNDEF_DYN_WSAGetLastError)
50 GetProcAddress( Ws2_32, "WSAGetLastError" ); 45 GetProcAddress( Ws2_32, "WSAGetLastError" );
51 printf("WSAGetLastError function pointer: %08x\n", (int)fn);
52 if( fn != NULL ) 46 if( fn != NULL )
53 out = (fn)(); 47 out = (fn)();
54 } 48 }
@@ -106,19 +100,15 @@ int DynamicWinsock2::select(int nfds, fd_set *readfds, fd_set *writefds,
106typedef SOCKET (__cdecl *FNDEF_DYN_socket)(int,int,int); 100typedef SOCKET (__cdecl *FNDEF_DYN_socket)(int,int,int);
107SOCKET DynamicWinsock2::socket(int domain, int type, int protocol) 101SOCKET DynamicWinsock2::socket(int domain, int type, int protocol)
108{ 102{
109 printf("in win32::socket\n");
110 SOCKET out = 0; 103 SOCKET out = 0;
111 HINSTANCE Ws2_32 = LoadLibrary(TEXT("Ws2_32")); 104 HINSTANCE Ws2_32 = LoadLibrary(TEXT("Ws2_32"));
112 printf("ws2_32 dll: %08x\n", (int) Ws2_32);
113 if( Ws2_32 != NULL ) 105 if( Ws2_32 != NULL )
114 { 106 {
115 FNDEF_DYN_socket fn = (FNDEF_DYN_socket) 107 FNDEF_DYN_socket fn = (FNDEF_DYN_socket)
116 GetProcAddress( Ws2_32, "socket" ); 108 GetProcAddress( Ws2_32, "socket" );
117 printf("socket function pointer: %08x\n", (int)fn);
118 if( fn != NULL ) 109 if( fn != NULL )
119 out = (fn)( domain, type, protocol ); 110 out = (fn)( domain, type, protocol );
120 } 111 }
121 printf("win32::socket complete.\n");
122 return out; 112 return out;
123} 113}
124 114