获取计算机名 比如右键我的电脑看到的名如果是10多个字符 返回的就8个字符
#if WIN32 || _WIN32
string camoption::computername()
{
char * str;
TCHAR vTCHAR[MAX_NAME_LEN];
DWORD vDWORD = MAX_NAME_LEN;
GetComputerName(vTCHAR, &vDWORD);
wcstombs(str, vTCHAR, size_t(MAX_NAME_LEN));
string ret = str;
return ret;
}
#endif
--
FROM 123.122.158.*