Results 1 to 4 of 4

Thread: get users logged

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Location
    chennai,tamilnadu,india
    Posts
    18

    Post

    hi,
    Wheather it is possible to get the users logged in winnt environment?
    thanks in advance
    minnal

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    No Problem.
    Create a new standard project
    Place 1 Command button on the form
    Paste in the following code, into the forms code section.

    Private Declare Function WNetGetUserA Lib "mpr" (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As Long

    Private Function GetUserName() As String
    Dim sUserNameBuff As String * 255
    sUserNameBuff = Space(255)
    Call WNetGetUserA(vbNullString, sUserNameBuff, 255&)
    GetUserName = Left$(sUserNameBuff, InStr(sUserNameBuff, vbNullChar) - 1)
    End Function

    Private Sub Command1_Click()
    Me.Caption = GetUserName
    End Sub

    Hope this helps,

    Steve.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Location
    chennai,tamilnadu,india
    Posts
    18

    Post

    Hi Steve
    Thankx for ur immediate response its working perfect.

    But is there any API for getting all the users logged in the network .

    i need to add all the users logged in the nT network into a combo or list box.

    please reply

    bye

    Minnal

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Location
    chennai,tamilnadu,india
    Posts
    18

    Post

    Hi Steve
    Thankx for ur immediate response its working perfect.

    But is there any API for getting all the users logged in the network .

    i need to add all the users logged in the nT network into a combo or list box.

    please reply

    bye

    Minnal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width