diff --git a/reactos/dll/win32/ws2_32/include/ws2_32.h b/reactos/dll/win32/ws2_32/include/ws2_32.h index c7f8c96d885..8b0e9a2f41c 100644 --- a/reactos/dll/win32/ws2_32/include/ws2_32.h +++ b/reactos/dll/win32/ws2_32/include/ws2_32.h @@ -28,6 +28,7 @@ unsigned long strtoul(const char *nptr, char **endptr, int base); #define EXPORT STDCALL +extern HINSTANCE g_hInstDll; extern HANDLE GlobalHeap; extern BOOL WsaInitialized; /* TRUE if WSAStartup() has been successfully called */ extern WSPUPCALLTABLE UpcallTable; diff --git a/reactos/dll/win32/ws2_32/misc/dllmain.c b/reactos/dll/win32/ws2_32/misc/dllmain.c index 74eed23e3c3..bddf23beddd 100644 --- a/reactos/dll/win32/ws2_32/misc/dllmain.c +++ b/reactos/dll/win32/ws2_32/misc/dllmain.c @@ -27,7 +27,7 @@ DWORD DebugTraceLevel = 0; /* To make the linker happy */ VOID STDCALL KeBugCheck (ULONG BugCheckCode) {} - +HINSTANCE g_hInstDll; HANDLE GlobalHeap; BOOL WsaInitialized = FALSE; /* TRUE if WSAStartup() has been successfully called */ WSPUPCALLTABLE UpcallTable; @@ -86,8 +86,8 @@ WSAStartup(IN WORD wVersionRequested, if (lpWSAData == NULL) return WSAEFAULT; - Low = LOWBYTE(wVersionRequested); - High = HIGHBYTE(wVersionRequested); + Low = LOBYTE(wVersionRequested); + High = HIBYTE(wVersionRequested); if (Low < 1) { @@ -841,6 +841,8 @@ DllMain(HANDLE hInstDll, { GlobalHeap = GetProcessHeap(); + g_hInstDll = hInstDll; + CreateCatalog(); InitProviderHandleTable();