C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-21-2009, 02:21 PM   #1
Registered User
 
Join Date: Jun 2009
Posts: 2
Low Level Keyboard Hook

I have been searching around the internet high and low and i cant seem to come up with a solution that i am looking for.

Basically i am making a login application for my TV station to track people who use the computer. I need to disable system key combinations like windows + d and alt + tab etc.

I know i need to use a user32.dll keyboard hook to accomplish this but i cannot find literature telling me how to do it.

Also i am looking for any general tutorial explaining about api hooking and dll imports.

Any information would be greatly helpful, thank you.
sumone4life is offline   Reply With Quote
Old 06-22-2009, 01:35 PM   #2
and the hat of vanishing
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,214
> Basically i am making a login application for my TV station to track people who use the computer.
You mean physically, but walking up to the machine and using it directly?

Or "login" as in registering on a website?

The former is easily solved by creating an account for each authorised user, then letting the normal windows login deal with the problem.

And if it's the latter, then talk of disabling "win+d" for example makes no sense.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Up to 8Mb PlusNet broadband from only £5.99 a month!
Salem is offline   Reply With Quote
Old 06-22-2009, 02:26 PM   #3
Registered User
 
Join Date: Jun 2009
Posts: 2
The former is correct and while i have contemplated that solution, i do not know all of the users that are going to be signing in.

Basically i am making an digital version of a paper sign in sheet. I have it all working except i want to build redundancies into my program because lets face it, users cant be trusted.

Someone will inevitable press the windows key or alt tab in order to get around loging their name into the computer.

I think i have found some MSDN articles that will help me out. In particular these two:

How to: Implement Callback Functions

How to set a Windows hook in Visual C# .NET

If anyone has any other C# API or DLL hooking tutorials/information that would be greatly appreciated.

Thank you.
sumone4life is offline   Reply With Quote
Old 06-22-2009, 05:10 PM   #4
Registered User
 
valaris's Avatar
 
Join Date: Jun 2008
Location: RING 0
Posts: 462
pinvoke.net: the interop wiki!
Grab a signature and burn.
valaris is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulate Keys with a Keyboard Hook guitarist809 Windows Programming 3 11-14-2008 08:14 PM
C/C++, low or high level? Sentral General Discussions 4 01-23-2007 11:43 PM
Keyboard hook joecaveman Windows Programming 2 09-03-2005 08:07 AM
Keyboard Hook jmd15 Windows Programming 19 08-07-2005 03:11 PM
How to keep static data in a keyboard hook? junbin Windows Programming 1 01-19-2003 03:24 AM


All times are GMT -6. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22