diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp index 98b9b2f4..29096796 100644 --- a/src/platforms/windows/windowsHandler.cpp +++ b/src/platforms/windows/windowsHandler.cpp @@ -28,6 +28,7 @@ #include #include #include // for winnls.h +#include // for WSAStartup() #ifdef VMIME_HAVE_MLANG_H # include @@ -41,6 +42,9 @@ namespace windows { windowsHandler::windowsHandler() { + WSAData wsaData; + WSAStartup(MAKEWORD(1, 1), &wsaData); + #if VMIME_HAVE_MESSAGING_FEATURES m_socketFactory = vmime::create (); #endif @@ -55,6 +59,8 @@ windowsHandler::~windowsHandler() #if VMIME_HAVE_FILESYSTEM_FEATURES delete (m_fileSysFactory); #endif + + WSACleanup(); }