摘要:        
服务端(server) #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") //把ws2_32.lib加到Link页的连接库 #define PORT 15001 //通信的端口(指服务器端) #def    阅读全文
posted @ 2018-06-09 10:04
lyshark
阅读(2345)
评论(0)
推荐(1)
        
            
        
        
摘要:        
实现简单的Socket通信 服务端代码(Server) #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") #define PORT 9999 int main() { WSADATA WSAData;    阅读全文
posted @ 2018-06-09 10:01
lyshark
阅读(4210)
评论(1)
推荐(2)
        
            
        
        
摘要:        
#include <windows.h> #include <tlhelp32.h> //进程快照函数头文件 #include <stdio.h> bool getProcess(const char *procressName) //此函数进程名不区分大小写 { char pName[MAX_PA    阅读全文
posted @ 2018-06-09 09:57
lyshark
阅读(4953)
评论(0)
推荐(0)
        
            
        
        
摘要:        
遍历进程 #include <windows.h> #include <tlhelp32.h> //进程快照函数头文件 #include <stdio.h> int main() { int countProcess=0; //当前进程数量计数变量 PROCESSENTRY32 currentPro    阅读全文
posted @ 2018-06-09 09:57
lyshark
阅读(1915)
评论(0)
推荐(0)
        
            
        
        
摘要:        
#include <string> #include<iostream> #include<windows.h> #include <sstream> using namespace std; string WORDToString(WORD w) { char tmpbuff[16]; sprin    阅读全文
posted @ 2018-06-09 09:56
lyshark
阅读(995)
评论(0)
推荐(0)
        
            
        
        
摘要:        
#include<winsock2.h> #include<iostream> #include<string> using namespace std; #pragma comment(lib, "WS2_32.lib") string getIP() { WSADATA WSAData; cha    阅读全文
posted @ 2018-06-09 09:55
lyshark
阅读(1777)
评论(0)
推荐(1)
        
            
        
        
摘要:        
#include<stdio.h> #include<winsock2.h> //该头文件需在windows.h之前 #include<windows.h> #include<string> #include<iostream> #pragma comment(lib,"ws2_32.lib") u    阅读全文
posted @ 2018-06-09 09:54
lyshark
阅读(4529)
评论(0)
推荐(1)
        

 浙公网安备 33010602011771号
浙公网安备 33010602011771号