AllApi.net

[an error occurred while processing this directive]
 
Private Declare Function WNetGetUser Lib "mpr" Alias "WNetGetUserA" (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As Long
Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    'Create a buffer
    Dim UserName As String * 255
    'Get the network user
    If WNetGetUser("", UserName, 255) = 0 Then
        MsgBox Left$(UserName, InStr(UserName, Chr$(0)) - 1)
    Else
        MsgBox "Not logged on"
    End If
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/