VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Find Windows UserName

Ghaffar Nagafpour  (5 Submissions)   Windows API Call/Explanation   VB 6.0   Unknown Difficulty   Sat 6th August 2005   Mon 8th February 2021

Find Windows UserName

API Declarations


'Email:[email protected]
'Location:Iran-Mazandaran-Tonekabon
'*****************************************

'Add 1CommandButton and 1Label to form


Private Declare Function GetUserNameA Lib "advapi32.dll" (ByVal lpBuffer As String, nSize As Long) As Long

Public Function GetUserName() As String

Dim UN As String * 255
Call GetUserNameA(UN, 255)
GetUserName = Left$(UN, InStr(UN, Chr$(0)) - 1)
End Function



Rate Find Windows UserName (1(1 Vote))
Find Windows UserName.bas

Find Windows UserName Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters