コンピューター名を取得しようとしていますが、取得しているテキストが正確な形式ではありません。私のコンピュータ名は「text-06」です。しかし、得られている結果は「ÊKÿÿÿÿ」です。
TCHAR compName[40];
if(GetComputerName(compName,(LPDWORD)&size)!=0)
wsprintf(text,("\nComputer Name : %s "),compName);
wsprintf(text,("%s"),compName);
TiXmlText * textcompnm = new TiXmlText(text);
elecompnm->LinkEndChild( textcompnm );