.
C# Signature:
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool GetUserName (System.Text.StringBuilder lpBuffer, Int32 i)
VB Signature:
Declare Auto Function GetUserName Lib "advapi32.dll" (ByVal lpBuffer As System.Text.StringBuilder, ByRef i As Integer) As Boolean
User-Defined Types:
None.
Alternative Managed API:
Environment.UserName (System.Environment)
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
The GetUserName function retrieves the name of the user associated with the current thread.
11/7/2014 12:08:30 AM - -122.170.55.192
The SetLastError API
1/26/2016 3:27:33 AM - -124.148.167.58
The GetUserName function retrieves the name of the user associated with the current thread.
11/7/2014 12:08:30 AM - -122.170.55.192