A que te referis? el pass de windows o uno de tu sistema
Bueno mire el titulo y supongo que hablas del pass del sistema, esto es lo que uso yo.
'---------------------------------------------------------------------------------------
' Module : mSystemPassword
' DateTime : 24/04/08 15:22
' Author : Cobein
' Mail : cobein27@hotmail.com
' Usage : At your own risk.
' WebPage : http://cobein27.googlepages.com/vb6
' Purpose : Validate system password
' Requirements: None
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
' History : 24/04/08 - First Cut....................................................
'---------------------------------------------------------------------------------------
Option Explicit
Private Const NERR_BASE As Long = 2100
Private Const NERR_PasswordCantChange As Long = (NERR_BASE + 143)
Private Const NERR_PasswordHistConflict As Long = (NERR_BASE + 144)
Private Const NERR_PasswordTooShort As Long = (NERR_BASE + 145)
Private Const NERR_PasswordTooRecent As Long = (NERR_BASE + 146)
Private Declare Function NetUserChangePassword Lib "netapi32.dll" (ByVal sDomain As String, ByVal sUserName As String, ByVal sOldPassword As String, ByVal sNewPassword As String) As Long
Public Function ValidateSysPassword( _
ByVal sPassword As String, _
Optional ByVal sUserName As String, _
Optional ByVal sDomain As String) As Boolean
If Len(sUserName) = 0 Then
sUserName = Environ$("USERNAME")
End If
If Len(sDomain) = 0 Then
sDomain = Environ$("USERDOMAIN")
End If
Select Case NetUserChangePassword( _
StrConv(sDomain, vbUnicode), _
StrConv(sUserName, vbUnicode), _
StrConv(sPassword, vbUnicode), _
StrConv(sPassword, vbUnicode))
Case 0, NERR_PasswordCantChange, _
NERR_PasswordHistConflict, _
NERR_PasswordTooShort, _
NERR_PasswordTooRecent
ValidateSysPassword = True
End Select
End Function