Win32: How to validate credentials against Active Directory?

前端 未结 5 684
一个人的身影
一个人的身影 2020-11-30 01:08

It has been asked, and answered for .NET, but now it\'s time to get an answer for native Win32 code:

How do i validate a Windows username and password?

5条回答
  •  死守一世寂寞
    2020-11-30 02:14

    Here is Microsoft's recommendation.

    As for the other answers, I'm not really sure why you're shooting them down. You are complaining about (relatively edge case) failures while trying to validate credentials, but if you are going to actually do something with those credentials then that operation is just going to fail anyway. If you are not going to actually do something with those credentials, then why do you need to validate them in the first place? It seems like a somewhat contrived situation, but obviously I don't know what you're trying to accomplish.

提交回复
热议问题