intercept keyboard inputs


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 12 of 12

Thread: intercept keyboard inputs

  1. #1
    Join Date
    Sep 2005
    Posts
    8

    intercept keyboard inputs

    hi newbie here, first of all this is a great site. someday i hope to contribute some codes. anyway a question to all. how do you intercept keyboard inputs made by a user. what i want to be able to do is to prevent a user from deleting a file or folder in a given directory. i've searched for spying on a folder and logging the keys that was press, and i've also read something about low-level keyboard hooks. it works great, but only half of my problem was solved. any help would be very much appreciated. thanks.

    p.s. if you have the time to email me, please do.

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    files can be deleted in a lot of ways, thus intercepting any key press is not the solution (for example right click in the file in explorer and select Delete)
    What are you trying to accomplish here? The only feasable solution is using Windows security
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Sep 2005
    Posts
    8
    well basically i want to protect my files (from being deleted or copied). i think i need to lock the folder where my files are. but i dont know how to do that. i've been searching the web but have not found any yet. do you have any idea on this?

  4. #4
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    where are your files stored and from whom do you want to protect them? A local computer? A network? A web sites? Files installed in a customer's computer?
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  5. #5
    Join Date
    Sep 2005
    Posts
    8
    i want to protect it from anyone trying to modify it, or delete, copy etc. it resides on a network computer, because employees have access to it, it's clearly visible using windows explorer. i read an article about managing low level keyboard hooks with api, i'm still experimenting on the code. it successfully blocks the key you specify but what about when the user right clicks on a file. also i'm searching how i can retrieve the current directory of the file.

    Managing Low-Level Keyboard Hooks with the Windows API http://www.developer.com/net/vb/article.php/1502401

  6. #6
    Join Date
    Feb 2004
    Posts
    27
    You can set permissions on these files, using Windows Explorer. See following in MSDN:
    http://www.microsoft.com/technet/pro...47b22a420.mspx

  7. #7
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    If everyone can see those files (I am not helping you hiding anything illegal, do I) it is because they are in a shared folder. Just move them in a private folder, that is not shared, and/or change the permissions to those files to be read/write only by you. If you can't do that, it means that the administrators of your network do not want anyone have protected files, and in that case sorry, but I can't help you.
    Marco
    PS what are you trying to do will not work, because you will have to install that program in every machine that can access you pc
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  8. #8
    Join Date
    Sep 2005
    Posts
    8
    what i want to do is for them not to be able to copy it, delete or rename the file. becaues it contains a list of sensitive records. anyway thanks for the time. maybe your right. oh and i'm not trying to hide anyting illegal. :P maybe i could think of something... someday... hopefully!

  9. #9
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    If the file contains sensitive data, then that should NOT be stored in a network computer where everyone can access it! Please contact you manager and/or your IT department to find a solution, ASAP! Sensitive material should be encrypted (in case some stole the computer) and put in a server, in a folder with special permission. This is a IT issue that never should have been assigned to a programme to start with.
    Sorry if I sound brusk, but I read too many laptops stolen containing social security numbers, medical records and private information that has never been encrypted...

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  10. #10
    Join Date
    Sep 2005
    Posts
    8
    i couldn't agree more. although i'm wondering why they assigned it to me. thanks anyway.

  11. #11
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    probably because they do not have a clue of waht they are doing, or they just want to delegate a problem they do not want to deal with. Time to start looking for another company? :-)
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  12. #12
    Join Date
    Sep 2005
    Posts
    8
    actually... hehe. it's hard when ur a prog and they expect you (more like tell you) to do tech support. especially when ur doing something very important that losing your concentration will make you forget the logic that took you days to figure out, because there is always someone who doesn't know how to turn the monitor on or something like that. not that im complaining.

Similar Threads

  1. Keyboard event
    By Varrus in forum VB Classic
    Replies: 1
    Last Post: 03-16-2005, 11:35 PM
  2. Keyboard Logging
    By James Abbott in forum VB Classic
    Replies: 2
    Last Post: 11-22-2001, 03:00 PM
  3. Keyboard Logging
    By James Abbott in forum VB Classic
    Replies: 0
    Last Post: 11-22-2001, 06:26 AM
  4. Swedish keyboard with Gnome
    By Mattias Segnestam in forum Open Source
    Replies: 0
    Last Post: 12-17-2000, 04:33 PM
  5. Replies: 4
    Last Post: 11-02-2000, 04:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center