I'm sorry I don't understand your problem, but I have a couple of suggestions.
1. Click
here to review the details of GetComputerName on MSDN.
2. Increase the size of pcname to MAX_COMPUTERNAME_LENGTH + 1 characters.
3. Before calling GetComputerName, set pcnamelen to sizeof(pcname). MSDN says on input, pcnamelen should be the size of the buffer (pcname).
4. Check the return value of GetComputerName and call GetLastError if GetComputerName returns a non-zero value. Click
here for an example of retrieving the last error.
5. If none of
that works, try using GetCompName from the CVI Programmer's Toolbox.