GetUserName

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

Hi everyone,

In VB.NET, is getting the network username still the same as VB 6.0, i.e.
using the the following API:
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA"
(ByVal lpBuffer As String, ByRef nSize As Integer) As Integer

Or, is there a way to do this using the .NET Framewrork?

Thanks!

Jack
 
jack said:
In VB.NET, is getting the network username still the same as VB 6.0, i.e.
using the the following API:
Private Declare Function GetUserName Lib "advapi32.dll" Alias
"GetUserNameA" (ByVal lpBuffer As String, ByRef nSize As Integer) As
Integer

Or, is there a way to do this using the .NET Framewrork?

'Environment.UserName'
'SystemInformation.UserName'
 
Back
Top