I'm trying to retrieve the name of the computer that my programm is running on. This is the code:
TCHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD cnt = MAX_COMPUTERNAME_LENGTH + 1;
std::string name = "";
if( GetComputerName( compName, &cnt) )
{
name = compName;
}
return name;
The compiler comes up with this error:
Error C2660: 'GetComputerNameA' : function does not take 2 arguments.
Does anyone has an idea ??
Grtz,