I got a mission to verify password before creating service.
It seems that there is no API function to do this directly.
The two possible solutions are
1. LogonUser(). This can verify passwd however it requires the user must have TCB privilege(Acting as part of operating system).
2. NetUserChangePassword(). The trick is to use this function to change password to itself. It will also verify the password. However if the account has "Allow Changes in X days" set in the "Minimum Password Age", this function will hang up forever.
Can anyone tell me another function to do it?
Thanks a lot in advance.