Make your own free website on

[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
    '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)
        MsgBox "Not logged on"
    End If
End Sub

Copyright © 1998-2000, The KPD-Team.
Send mail to with comments about this web site.
This site is located at