Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim strString As String
    'Create a buffer
    strString = String(255, Chr$(0))
    'Get the computer name
    GetComputerName strString, 255
    'remove the unnecessary chr$(0)'s
    strString = Left$(strString, InStr(1, strString, Chr$(0)))
    'Show the computer name
    MsgBox strString
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/