How to validate user credentials on Microsoft operating systems

http://support.microsoft.com/kb/180548/en-us

Using LogonUser API , but there are problem in Windows NT , Windows 2000