Low Level Keyboard Hook

This is a discussion on Low Level Keyboard Hook within the C# Programming forums, part of the General Programming Boards category; I have been searching around the internet high and low and i cant seem to come up with a solution ...

  1. #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.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,555
    > 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.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #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.

  4. #4
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    pinvoke.net: the interop wiki!
    Grab a signature and burn.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulate Keys with a Keyboard Hook
    By guitarist809 in forum Windows Programming
    Replies: 3
    Last Post: 11-14-2008, 07:14 PM
  2. C/C++, low or high level?
    By Sentral in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-23-2007, 10:43 PM
  3. Keyboard hook
    By joecaveman in forum Windows Programming
    Replies: 2
    Last Post: 09-03-2005, 08:07 AM
  4. Keyboard Hook
    By jmd15 in forum Windows Programming
    Replies: 19
    Last Post: 08-07-2005, 03:11 PM
  5. How to keep static data in a keyboard hook?
    By junbin in forum Windows Programming
    Replies: 1
    Last Post: 01-19-2003, 02:24 AM

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