Why is WSAConnect working and connect(); not?
问题 I'm experimenting with some reverse shell code in C. It is working but only if I use WSAConnect() and WSASocket() . If I use socket() or connect() instead, it's not working. Why is this? I always use connect() instead of WSAConnect() , and socket() instead of WSASocket() . I know I am missing something. #include <winsock2.h> #include <stdio.h> #pragma comment(lib, "ws2_32.lib") WSADATA wsa; SOCKET sock; struct sockaddr_in server; STARTUPINFO sinfo; PROCESS_INFORMATION pinfo; int main(int argc