GetUserNameEx (secur32)
Last changed: -93.159.254.162

.
Summary
Gets the name of the user or other security principal associated with the calling thread.

C# Signature:

[DllImport("secur32.dll", CharSet=CharSet.Auto)]
public static extern int GetUserNameEx (int nameFormat, StringBuilder userName,
   ref uint userNameSize);

VB Signature:

Declare Function GetUserNameEx Lib "secur32.dll" (nameFormat As Integer, _
   userName As StringBuilder, ByRef userNameSize As Integer) As Integer

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

System.Environment.UserName

Documentation