Visual Basic (Declaration) | |
---|---|
<DllImportAttribute("advapi32.dll")> <PreserveSigAttribute()> Public Shared Function LogonUser( _ ByVal lpszUsername As String, _ ByVal lpszDomain As String, _ ByVal lpszPassword As String, _ ByVal dwLogonType As Integer, _ ByVal dwLogonProvider As Integer, _ ByRef phToken As IntPtr _ ) As Boolean |
C# | |
---|---|
[DllImportAttribute("advapi32.dll")] [PreserveSigAttribute()] public static bool LogonUser( string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken ) |
Parameters
- lpszUsername
- lpszDomain
- lpszPassword
- dwLogonType
- dwLogonProvider
- phToken
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family