This is the code U need. It works under Win98 too. If U need specifically to get it from the registry, let me know and give the code, but I think this is a better and faster way.
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Dim ComputerName As String
dim Res As Long
ComputerName$ = Space(200) 'Though it
'works this way. There's a constant named
'MAX_COMPUTERNAME_LENGTH that tells U
'the right max length of the computer name.
'in the WinApi32.txt
'but couldn't find it.
Res& = GetComputerName(ComputerNa
Mq.
Main Topics
Browse All Topics





by: leewPosted on 1999-07-28 at 14:38:18ID: 1528065
And you can give me URLs or old questions - if they're commented as I mention, I'll still give the A grade.