Get User Name
Returns the current user name using a dll call
AI
Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Codice sorgente
Function GetUser() ' This function uses a windows dll to query the registry automatically ti return the user name Dim sBuffer As String Dim lSize As Long ' Parameters for the dll declaration are set sBuffer = Space$(255) lSize = Len(sBuffer) Call GetUserName(sBuffer, lSize) ' Call the declared dll function If lSize > 0 Then GetUser = Left$(sBuffer, lSize) ' Remove empty spaces Else GetUser = vbNullString ' Return empty if no user is found End If End Function
Commenti originali (3)
Recuperato da Wayback Machine