Files
PowerShell/impl/getcomputername.cpp
T

12 lines
208 B
C++
Raw Normal View History

#include "getcomputername.h"
#include <unistd.h>
2015-04-06 09:57:16 -07:00
BOOL GetComputerName(LPTSTR name, LPDWORD len)
{
2015-04-06 09:57:16 -07:00
int host = gethostname(name, HOST_NAME_MAX);
if(host == 0)
{
return TRUE;
}
return FALSE;
}