Results 1 to 2 of 2

Thread: Users Logged in NT

  1. #1

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

    Post

    Hi Guys,

    I would like to know whether it is possible to get all the users logged in the NT Network.
    If Possible please provide me with the code.

    This is very very urgent.
    I have tried with some API's but n vain.

    Thanx
    minnal

  2. #2
    Junior Member
    Join Date
    Nov 1999
    Posts
    27

    Post

    Under Windows 95, the computer can be set up so that many different users can log into the computer. The name of current user can be retrieved by using the following code.


    Dim s As String
    Dim cnt As Long
    Dim dl As Long
    Dim CurUser as String
    cnt = 199
    s = String$(200, 0)
    dl = GetUserName(s, cnt)
    If dl <> 0 Then curuser = Left$(s, cnt) Else curuser = ""
    You must declare the following function in the declarations section of a form or module in the project.
    Declare Function GetUserName Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) _
    As Long

    Remember this is for Win95, but it should tell you the login user of NT too.
    I don't know about all the user logged on.

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