You should have looked at the link which perfectly describes all parameters:
Code:
STRING *comp;

void getComputerName()
{
    char buffer[MAX_COMPUTERNAME_LENGTH + 1];
    long size = MAX_COMPUTERNAME_LENGTH + 1;

    memset(buffer, 0, size);


    if(GetComputerName(buffer, &size))
    {
         str_cpy(comp, buffer);
    }
    else
    {
         str_cpy(comp, "Couldn't get the computer name");
    }
}




Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com