Searching...
1:58 AM

Get Computer Name

code:
Public Declare Function GetComputerName Lib "Kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long


Public Function GetComputer() As String
Dim strName As String, lName As Long

    strName = Space(256)
    lName = GetComputerName(strName, 256)
    GetComputer = strName

End Function

0 comments:

Post a Comment

 
Back to top!