LogonUser() returns errorcode 2(0x2)
Krishna Kumar J
6
Reputation points
Scenario : Domain user password verification at login screen by my custom credential provider.
Implementation
- I have used LogonUser function for the above scenario with dwLogonType=LOGON32_LOGON_INTERACTIVE.
- Using LOGON32_LOGON_NETWORK for dwLogonType fails when the Domain controllers are not reachable(remote work environment) from the PC and hence I moved to LOGON32_LOGON_INTERACTIVE which works for local cached credentials verification also.
Problem : LogonUser is failing with error code 2 (0x2) which doesn't make sense as per system error codes as ERROR_FILE_NOT_FOUND "The system cannot find the file specified".
please help me in,
- Identifying the root cause and reason for this error code in order to fix.
- Whether I'm using the correct dwLogonType for my scenario ? If not any suggestion ?