Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long
Public Property Get UserName() As Variant Dim sBuffer As String Dim lSize As Long sBuffer = Space$(255) lSize = Len(sBuffer) Call GetUserName(sBuffer, lSize) UserName = Left$(sBuffer, lSize) End Property
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment