GetComputerName失败,GetLastError返回111,是什么鬼意思
得不到计算机名,得到1个空字符串。SHIT
[解决办法]
你的输入参数的容量太小了
#define INFO_BUFFER_SIZE 32767
TCHAR infoBuf[INFO_BUFFER_SIZE];
DWORD bufCharCount = INFO_BUFFER_SIZE;
// Get and display the name of the computer.
bufCharCount = INFO_BUFFER_SIZE;
if( !GetComputerName( infoBuf, &bufCharCount ) )