WM机器上能不能获取本机地址? PC上可以有localhost/127.0.0.1 WM上有没有相应的方法?谢谢。
------解决方案--------------------
gethostname(Buff, 256);
LocalAddress = gethostbyname(Buff);
sprintf(Buff, "%d.%d.%d.%d\0", LocalAddress->h_addr_list[0][0] & 0xFF, LocalAddress->h_addr_list[0][1] & 0x00FF, LocalAddress->h_addr_list[0][2] & 0x0000FF, LocalAddress->h_addr_list[0][3] & 0x000000FF);
------解决方案--------------------
VOID GetSystemInfo(
LPSYSTEM_INFO lpSystemInfo
);