![]() |
|||
|
About Article
Alternative to Converting TCHAR[] to string, while getting PC Name
You might have considered using ::GetComputerNameA() which does the conversion for you:std::string GetSystemName(){ CHAR sBuf[MAX_COMPUTERNAME_LENGTH + 1] = {0}; DWORD dwLen = MAX_COMPUTERNAME_LENGTH; ::GetComputerNameA(sBuf, &dwLen); return std::string(sBuf);}Note...
Top News
The Next Version of Android - Some of What's Coming Get the Insider News free each morning.Related Articles
|
||||||||||||||