|
-
May 4th, 2005, 04:37 AM
#1
Thread Starter
New Member
List all users currently logged on in the domain
Is it possible to list all users currently logged on in the domain (active directory) using vb6?
-
May 4th, 2005, 05:54 AM
#2
Re: List all users currently logged on in the domain
Rather than ask a few questions, I'll just point you towards here:
http://msdn.microsoft.com/library/de...ting_users.asp
-
Jul 26th, 2005, 01:50 AM
#3
Hyperactive Member
Re: List all users currently logged on in the domain
I was already able to display all the users in a domain. But my problem was that I got all the info (eg. fullname, firstname, address) except for the username. How can I get a user's username in a domain? (in vb6 pls)
Thanks in advance!
-
Dec 19th, 2008, 06:12 AM
#4
New Member
Re: List all users currently logged on in the domain
Please can you send me the code to get all user names from active directory.
here is your code to get username:
Public Function rgbGetUserName() As String
'return the name of the user
Dim tmp As String
tmp = Space$(MAX_USERNAME)
If GetUserName(tmp, Len(tmp)) Then
rgbGetUserName = TrimNull(tmp)
End If
End Function
Private Function TrimNull(item As String)
Dim pos As Integer
pos = InStr(item, Chr$(0))
If pos Then
TrimNull = Left$(item, pos - 1)
Else: TrimNull = item
End If
End Function
In declaration part u have to use this.
Private Declare Function GetUserName Lib "advapi32" _
Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long
-
Dec 19th, 2008, 07:52 AM
#5
Re: List all users currently logged on in the domain
Did you not see the link in Post #2?
-
Dec 19th, 2008, 12:37 PM
#6
Hyperactive Member
Re: List all users currently logged on in the domain
Something came back from the grave.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|