Desktop Functions: Smart Device Functions:
|
GetUserName (advapi32)
C# Signature:
[DllImport("advapi32.dll", SetLastError = true)] static extern bool GetUserName(System.Text.StringBuilder sb, ref Int32 length) VB Signature:
Declare Auto Function GetUserName Lib "advapi32.dll" (ByVal lpBuffer As String, ByRef nMax As Integer) As Boolean User-Defined Types:None. Alternative Managed API:Environment.UserName (System.Environment) Notes:None. Tips & Tricks:Please add some! Sample Code:
using System; Sample Code:Dim xstr as String = Space(255) Dim max as Integer = 255 Dim rc as Integer rc = GetUserName(xstr,max) ' max will now contain the total number of ' characters written to the buffer (here: xstr) MessageBox.Show(Mid(xstr,1,max)) Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|