wsastartup

Is it possible to tell if WSAStartup has been called in a process?

谁说胖子不能爱 提交于 2019-11-30 01:58:41
I've started writing an ActiveX control that makes use of sockets. Applications that use this control may or may not also use sockets. Is it possible for my control to tell whether WSAStartup has been called? If not, call it. A little test reveals that calling WSAStartup multiple times is tollerated. But what happens if a different winsock version is requested? will this break other parts of the application? Yes it is possible. And here is how it's done. bool WinsockInitialized() { SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET && WSAGetLastError() ==

MinGW + Boost: undefined reference to `WSAStartup@8'

假如想象 提交于 2019-11-29 13:32:56
below is what I execute D:\Just4Fun\software\>make -f Makefile.hands stest g++.exe -g -D_WIN32_WINNT=0x0601 -ID:\Boost\boost_1_51_0 -LD:\Boost\boost_1_51_0\stage\lib -LD:\MinGW\lib -lboost_system-mgw46-d-1_51 -lboost_filesystem-mgw46-d-1_51 -lboost_iostreams-mgw46-d-1_51 -lws2_32 -lwsock32 -o TestSerial.exe TestSerial.cpp below is the result of that C:\Users\oleg\AppData\Local\Temp\ccXpC7RG.o: In function 'ZN5boost4asio6detail17winsock_init_base7startupERNS2_4dataEhh': D:/Boost/boost_1_51_0/boost/asio/detail/impl/winsock_init.ipp:39: undefined reference to 'WSAStartup@8'C:\Users\oleg\AppData

git pull fails with “Either the application has not called WSAStartup, or WSAStartup failed”

别来无恙 提交于 2019-11-29 09:24:47
I have just installed Windows 10, Visual Studio Community 2015, and Git for Windows . I also installed the latest Bitbucket and GitHub extensions. Within Visual Studio I cloned my Bitbucket.com-hosted repository, and performed these operations successfully: $ git --version git version 2.19.2.windows.1 $ git pull Already up to date. But then when I tried to pull from another repository I got this error: $ git pull git://github.com/aegif/CmisSync.git fatal: unable to lookup github.com (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. ) I am able to ping github

git pull fails with “Either the application has not called WSAStartup, or WSAStartup failed”

↘锁芯ラ 提交于 2019-11-28 02:52:42
问题 I have just installed Windows 10, Visual Studio Community 2015, and Git for Windows. I also installed the latest Bitbucket and GitHub extensions. Within Visual Studio I cloned my Bitbucket.com-hosted repository, and performed these operations successfully: $ git --version git version 2.19.2.windows.1 $ git pull Already up to date. But then when I tried to pull from another repository I got this error: $ git pull git://github.com/aegif/CmisSync.git fatal: unable to lookup github.com (port 9418