Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access to system

Status
Not open for further replies.

sgueper

Programmer
May 2, 2002
18
ES
I would like to access to the system to take usernames, check passwords with Windows NT or Windows 2000... because i want to check the entries to a vb program.

It would be very useful for me
thank you
Silvi
 
You can use the GetUserName API to obtain a username. Not aware of any APIs that retrieve passwords. I hope none exist!!

‘=====================================
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long


Private Sub Form_Load()
Dim sUserName As String
Dim iLen As Long

sUserName = Space(255)
iLen = GetUserName(sUserName, 255)
MsgBox Left$(sUserName, InStr(sUserName, vbNullChar) - 1)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top