Click or drag to resize

UserAccountControlLogOnInteractiveUser Method (String, String, String, SafeTokenHandle)

Logs on the user with the given credentials as an interactive user.

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll)
Syntax
public static int LogOnInteractiveUser(
	string? userName,
	string? domain,
	string? password,
	out SafeTokenHandle?? userToken
)

Parameters

userName
Type: SystemString
Name of the user.
domain
Type: SystemString
The domain.
password
Type: SystemString
The password.
userToken
Type: TomsToolbox.DesktopSafeTokenHandle
The user token.

Return Value

Type: Int32
0 if the function succeeds, a HRESULT of the last error if the function fails.
See Also