X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/882dfc675372ec3544e329ad6df8c4cdddbdb52d..ac8d0c118b7403e2838e75124b442051299e6f6c:/src/msw/gsockmsw.c diff --git a/src/msw/gsockmsw.c b/src/msw/gsockmsw.c index 5016995a45..7bc845bed0 100644 --- a/src/msw/gsockmsw.c +++ b/src/msw/gsockmsw.c @@ -47,6 +47,7 @@ #include "wx/msw/gsockmsw.h" #include "wx/gsocket.h" +HINSTANCE wxGetInstance(void); #define INSTANCE wxGetInstance() #else @@ -106,9 +107,8 @@ static int firstAvailable; /* Global initializers */ -int GSocket_Init(void) +int _GSocket_GUI_Init(void) { - WSADATA wsaData; WNDCLASS winClass; int i; @@ -141,11 +141,10 @@ int GSocket_Init(void) } firstAvailable = 0; - /* Initialize WinSocket */ - return (WSAStartup((1 << 8) | 1, &wsaData) == 0); + return 1; } -void GSocket_Cleanup(void) +void _GSocket_GUI_Cleanup(void) { /* Destroy internal window */ DestroyWindow(hWin); @@ -153,14 +152,11 @@ void GSocket_Cleanup(void) /* Delete critical section */ DeleteCriticalSection(&critical); - - /* Cleanup WinSocket */ - WSACleanup(); } /* Per-socket GUI initialization / cleanup */ -int _GSocket_GUI_Init(GSocket *socket) +int _GSocket_GUI_Init_Socket(GSocket *socket) { int i; @@ -187,7 +183,7 @@ int _GSocket_GUI_Init(GSocket *socket) return TRUE; } -void _GSocket_GUI_Destroy(GSocket *socket) +void _GSocket_GUI_Destroy_Socket(GSocket *socket) { /* Remove the socket from the list */ EnterCriticalSection(&critical);