mirror of https://github.com/BOINC/boinc.git
windows hostname fix
svn path=/trunk/boinc/; revision=847
This commit is contained in:
parent
27c4fa9943
commit
85ce7aa65d
|
@ -18,6 +18,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <afxwin.h>
|
#include <afxwin.h>
|
||||||
|
#include <winsock.h>
|
||||||
#include "client_types.h"
|
#include "client_types.h"
|
||||||
#include "hostinfo.h"
|
#include "hostinfo.h"
|
||||||
|
|
||||||
|
@ -176,9 +177,19 @@ int get_host_info(HOST_INFO& host) {
|
||||||
|
|
||||||
get_host_disk_info(host.d_total, host.d_free);
|
get_host_disk_info(host.d_total, host.d_free);
|
||||||
|
|
||||||
|
// Open the WinSock dll so we can get host info
|
||||||
|
WORD wVersionRequested;
|
||||||
|
WSADATA wsdata;
|
||||||
|
wVersionRequested = MAKEWORD(1, 1);
|
||||||
|
WSAStartup(wVersionRequested, &wsdata);
|
||||||
|
|
||||||
|
// Get host name/ip info
|
||||||
get_local_domain_name(host.domain_name);
|
get_local_domain_name(host.domain_name);
|
||||||
get_local_ip_addr_str(host.ip_addr);
|
get_local_ip_addr_str(host.ip_addr);
|
||||||
|
|
||||||
|
// Close the WinSock dll
|
||||||
|
WSACleanup();
|
||||||
|
|
||||||
host.timezone = get_timezone();
|
host.timezone = get_timezone();
|
||||||
|
|
||||||
MEMORYSTATUS mStatus;
|
MEMORYSTATUS mStatus;
|
||||||
|
|
Loading…
Reference in New Issue