Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal sBuffer As String, lSize As Long) As Long
Public Function NameOfPC(MachineName As String) As Long Dim NameSize As Long Dim X As Long MachineName = Space$(16) NameSize = Len(MachineName) X = GetComputerName(MachineName, NameSize)End Function
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment