Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Checking the validity of windows username and password


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jan 11, 2017 4:36 PM Last Post By: Andy Stobirski Threads: [ Previous | Next ]
Andy Stobirski

Posts: 18
Registered: 6/12/16
Checking the validity of windows username and password  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2017 3:43 AM
Hi Guys

I'm looking to validate the windows username and password from Borland C++ v5.0.

Basically, in order to logon to an app a user will enter the username and password that they use to login to windows, and the app checks if it's correct. The Windows computer can be logged onto by user X, but users X, Y or Z may logon to app.

Any tips, pointers or anything would be helpful.

Cheers
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Checking the validity of windows username and password  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2017 9:38 AM   in response to: Andy Stobirski in response to: Andy Stobirski
Andy wrote:

Basically, in order to logon to an app a user will enter the username
and password that they use to login to windows, and the app checks
if it's correct.

Use the Win32 API LogonUser() function:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184.aspx

Also see:

How to validate user credentials on Microsoft operating systems
https://support.microsoft.com/en-us/kb/180548

--
Remy Lebeau (TeamB)
Andy Stobirski

Posts: 18
Registered: 6/12/16
Re: Checking the validity of windows username and password  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2017 4:36 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
That's perfect - thank you for taking the time to answer my question.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02