Function that returns computer Name where application is running.
Function that returns computer Name where application is running.
API Declarations
(ByVal lpbuffer As String, nSize As Long) As Long
Rate Function that returns computer Name where application is running.
(2(2 Vote))
Dim lngNCompSize As Long
Dim strNetCompName As String
'get the computer name
lngNCompSize = 255
strNetCompName = Space(lngNCompSize)
If GetComputerName(strNetCompName, lngNCompSize) <> 0 Then
strNetCompName = Left$(strNetCompName, lngNCompSize)
Else
strNetCompName = "DEFAULT"
End If
GetWorkStationID = UCase(strNetCompName)
End Function
Function that returns computer Name where application is running. Comments
No comments yet — be the first to post one!
Post a Comment