Thread: Keyboard Hook

  1. #16
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    to clear the char array, you could do either

    logged_keys[0] = '\0';

    or

    strcpy(logged_keys, "");

  2. #17
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Like Tonto said, why not try ZeroMemory? Oh and cgod what compiler were you using to make that "HotKey" keylogger?
    Last edited by jmd15; 08-04-2005 at 09:18 AM.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  3. #18
    Banned
    Join Date
    Oct 2004
    Posts
    250
    MSVC 7.0, it should work on any compiler tho.

  4. #19
    the magic penguim
    Join Date
    Jul 2005
    Posts
    91
    You know that RegisterHotKey only works for the program that's running it don't you? It dosen't set a system wide hook.

  5. #20
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    I don't like the RegisterHotKeys way of doing it, I'm gonna write a DLL and it WILL work, even if it takes me a little while. Oh I am using Dev-C++ and it seems to not like some of your code.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

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, 08:14 PM
  2. C++ Global Keyboard Hook
    By darknite135 in forum C++ Programming
    Replies: 4
    Last Post: 02-01-2008, 07:36 PM
  3. Keyboard hook
    By joecaveman in forum Windows Programming
    Replies: 2
    Last Post: 09-03-2005, 08:07 AM
  4. How to keep static data in a keyboard hook?
    By junbin in forum Windows Programming
    Replies: 1
    Last Post: 01-19-2003, 03:24 AM