Windows Socket 初始化 #include <winsock2.h> #pragma comment(lib, "ws2_32.lib") WSADATA wsaData; WSAStartup(MAKEWORD(2,2), &wsaData); // todo: use windows socket to do something WSACleanup(); Windows GDI+初始化 #include <gdiplus.h> #pragma comment(lib, "gdiplus.lib") using namespace Gdiplus; ULONG_PTR m_token; GdiplusStartupInput input; GdiplusStartup(&m_token, &input, NULL); // todo: use GDI+ to do something GdiplusShutdown(m_token);