internal static extern bool LogonUserExExW( string lpszUsername, string lpszDomain, SecureStringMarshalBuffer lpszPassword, SecurityLogonType dwLogonType, Logon32Provider dwLogonProvider, SafeTokenGroupsBuffer pTokenGroups, out SafeKernelObjectHandle phToken, [Out] OptionalPointer ppLogonSid, [Out] OptionalPointer ppProfileBuffer, [Out] OptionalPointer pdwProfileLength, [Out] QUOTA_LIMITS pQuotaLimits );
public SEC_WINNT_AUTH_IDENTITY(string user, string domain, SecureString password, DisposableList list) { User = user; UserLength = user?.Length ?? 0; Domain = domain; DomainLength = domain?.Length ?? 0; if (password != null) { Password = list.AddResource(new SecureStringMarshalBuffer(password)); PasswordLength = password.Length; } Flags = SecWinNtAuthIdentityFlags.Unicode; }
internal static extern bool LogonUser(string lpszUsername, string lpszDomain, SecureStringMarshalBuffer lpszPassword, SecurityLogonType dwLogonType, Logon32Provider dwLogonProvider, out SafeKernelObjectHandle phToken);