This is the code I'm using to get the computer name:
Declare Function GetComputerName& Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long)
Function GetIdentifier()
Dim lpBuff As String * 1314
GetComputerName lpBuff, Len(lpBuff)
GetIdentifier = lpBuff...