where can i find my Computer's name in the registry?
Or, what is the API function to get the name?
Thanks!
Printable View
where can i find my Computer's name in the registry?
Or, what is the API function to get the name?
Thanks!
Code:
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
LPTSTR pszName = new TCHAR[dwSize];
BOOL bRet = ::GetComputerName( pszName, &dwSize );
delete []pszName;
Also see
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName
in the registry