changes based on comments

This commit is contained in:
Aaron Katz committed 2015-04-06 09:57:16 -07:00
1 parent 70645d5bc1
commit ea7b78ef1c
4 files changed
+32 -20

No files matched your search

+7 -3
View File
@@ -1,8 +1,12 @@
#include "getcomputername.h"
#include <unistd.h>
int GetComputerName(char *name, size_t len)
BOOL GetComputerName(LPTSTR name, LPDWORD len)
{
int host = gethostname(name, len);
return host;
int host = gethostname(name, HOST_NAME_MAX);
if(host == 0)
{
return TRUE;
}
return FALSE;
}