string LOCALHOST;
TCHAR HOSTNAME[UNLEN+1];
DWORD HOSTNAME_LEN = UNLEN+1;
LOCALHOST = GetComputerName((TCHAR*)HOSTNAME,&HOSTNAME_LEN);
string log_path = "log.txt";
ofstream log;
log.open(log_path, ofstream::app);
log << "Имя узла:" << endl;
log << LOCALHOST << endl;
log.close();