Please support our C# advertiser: Programming Forums
Views: 4743 | Replies: 4
![]() |
•
•
Join Date: Jul 2006
Posts: 41
Reputation:
Rep Power: 3
Solved Threads: 0
hi everyone i need a little help, im trying to create a program which ask a user a password and when it reached a max password retry it goes to windows login. when he enters the right windows login my app will try to ask again. until the correct password is given.
does anyone knows or have an idea on how to do this? thanks a lot
does anyone knows or have an idea on how to do this? thanks a lot
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 13,372
Reputation:
Rep Power: 33
Solved Threads: 327
what is the reasoning behind booting someone to the login screen if they dont know the password to an application?
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
•
•
Join Date: Nov 2006
Location: Bonners Ferry, ID
Posts: 280
Reputation:
Rep Power: 3
Solved Threads: 39
Not a smart idea, and an easy way to get into a legal jam if the forced logout causes loss of data in another application.
But, if you inisit on this insanity, you could register your application to restart in the registry, then call the Win API call to force Logout which will bring up the login screen (THAT IS IF... The PC is setup to require a login). The force Logout will close all other user processes and applicaitons on its way down.
Be careful what you wish for.
But, if you inisit on this insanity, you could register your application to restart in the registry, then call the Win API call to force Logout which will bring up the login screen (THAT IS IF... The PC is setup to require a login). The force Logout will close all other user processes and applicaitons on its way down.
Be careful what you wish for.
•
•
Join Date: May 2004
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Are you wanting to just lock the workstation, rather than log the user out? If so, you can do this somewhere in your class:
And then just called LockWorkStation() like any other method.
I wouldn't suggest forcing a logout like other said, so give this a shot.
c# Syntax (Toggle Plain Text)
[DllImport("user32.dll")] public static extern void LockWorkStation();
And then just called LockWorkStation() like any other method.
I wouldn't suggest forcing a logout like other said, so give this a shot.
Last edited by Kerjo : Jan 2nd, 2008 at 11:37 pm. Reason: Hopefully adding language to code
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode