调用那个函数得到本机的IP
struct hostent *thisHost;
struct in_addr in;
char MyName[80];
char *IP,*ptr;
if(gethostname (MyName,80)==SOCKET_ERROR)
return NULL;
if(!(thisHost = gethostbyname(MyName)))
return NULL;
memset((void *)&in,sizeof(in),0);
in.s_addr=*((unsigned long *)thisHost->h_addr_list[0]);
if(!(ptr = inet_ntoa(in)))
return NULL;
IP = new char[strlen(ptr)+1],
strcpy(IP,ptr);
return IP;
======================================================================================================================
控制鼠标在屏幕的任何位置单击
BOOL SetCursorPos(int x/*水平位置*/,int y/*垂直位置*/);
BOOL SetCursor();
::PostMessage
struct hostent *thisHost;
struct in_addr in;
char MyName[80];
char *IP,*ptr;
if(gethostname (MyName,80)==SOCKET_ERROR)
return NULL;
if(!(thisHost = gethostbyname(MyName)))
return NULL;
memset((void *)&in,sizeof(in),0);
in.s_addr=*((unsigned long *)thisHost->h_addr_list[0]);
if(!(ptr = inet_ntoa(in)))
return NULL;
IP = new char[strlen(ptr)+1],
strcpy(IP,ptr);
return IP;
======================================================================================================================
控制鼠标在屏幕的任何位置单击
BOOL SetCursorPos(int x/*水平位置*/,int y/*垂直位置*/);
BOOL SetCursor();
::PostMessage