I am having problems with the LogonUser () API function in C ++. The computer on which I am testing this is not part of the domain. The account I am testing exists on the computer, but when I supply an invalid domain, it authenticates the login.
This does not seem right to me.
HANDLE token; if (!LogonUser("LocalUser", "InvalidDomain", "Password", LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &token)) { unsigned long error = GetLastError(); }
Is this the right behavior?
source share