|
-
May 20th, 1999, 09:52 PM
#1
How to get current username and password
Hi, everyone:
Who can tell me how to get current logon user name and passwor programmablly under Windows NT or Windows 95?
Please tell me as soon as possible!
Thank you!
clara
-
May 21st, 1999, 04:14 AM
#2
Re: How to get current username and password
You can get the name of the logged in user via the NetUserGetInfo() API call, but there is no way to get the user's password programmatically. This is by design, and is a fundamental security restriction of almost every OS known to man. You can, however, test a potential password to see if it is the "real" one, so you could conceivably ask the user for their password, then check it to make sure they didn't lie to you...
Cheers!
Humble Programmer
,,,^..^,,,
-
May 21st, 1999, 05:34 AM
#3
Re: How to get current username and password
Hello
How can you test if the user specified correct password.
Can you actually login programmaticly ?
-
May 21st, 1999, 06:49 AM
#4
Re: How to get current username and password
Read Micro$oft Knowlege Base article Q180548 "HOWTO: Validate User Credentials on Microsoft WinNT and Win95". It even has a snippet of sample code to point you in the right direction.
Cheers!
Humble Programmer
,,,^..^,,,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|