How to obtain logged in user and workstation name 
Author Message
 How to obtain logged in user and workstation name

Anybody knows how to obtain subj in VB 6 program? Don't want to do it
through MTS.

--
Sergei Levin, Technology Co-Director, ICS Soft, Perm, Russia.



Mon, 27 Aug 2001 03:00:00 GMT  
 How to obtain logged in user and workstation name
Look up GetUserName API functions.  That will get you started..   Here is an
example of a code function I use to get the user name.   Basic premise can
also be used to get the workstation name as well.

Public Function NTDomainUserName() As String
    Dim strBuffer As String * 255
    Dim lngBufferLength As Long
    Dim lngRet As Long
    Dim strTemp As String

    lngBufferLength = 255
    lngRet = GetUserName(strBuffer, lngBufferLength)
    strTemp = UCase(Trim$(strBuffer))
    NTDomainUserName = Left$(strTemp, Len(strTemp) - 1)
    UserNameNT = NTDomainUserName
    Exit Function
--
Sincerely,

Todd B - Agendum Software
Visit our Website to download the FREE AgWindowWatch screen resolution
checker!
New ActiveX Controls and Add-in demo downloads available!  AgMapthat Project
Explorer Replacement!
AgFastform, AgDigital, AgOnlineUpdate and many more!!
http://www.AgendumSoftware.com

Quote:

>Anybody knows how to obtain subj in VB 6 program? Don't want to do it
>through MTS.

>--
>Sergei Levin, Technology Co-Director, ICS Soft, Perm, Russia.




Mon, 27 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Finding the workstation name of a currently logged on user

2. Get the workstation name that the user last logged in with

3. Obtaining the network name of the workstation running my VB app

4. getting users name and workstation name Urgent

5. How to obtain logon name or see if any user is logged on the workstation ?

6. How to obtain logon name or see if any user is logged on the workstation ?

7. List of workstations user is logged on to.

8. Current User Logged onto Workstation

9. Which user is logged onto Workstation?

10. Sending A message to users on the network who are logged in on several workstations

11. Current Domain User Name of logged in user?

12. Obtaining User logged on at Remote NT box

 

 
Powered by phpBB® Forum Software