?
Solved

How to create events systemwide?

Posted on 2008-10-24
8
Medium Priority
?
188 Views
Last Modified: 2012-05-05
Hello Experts,

I'd like to know how to create events systemwide using Delphi7...For example, my application should detect all mouse clicks, or all keys pressed, or all files that are openned?? I don't want to use hooks....
0
Comment
Question by:Ventura_v
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 28

Expert Comment

by:2266180
ID: 22798574
that's simple: AFAIK, you cannot do it without hooks.
0
 

Author Comment

by:Ventura_v
ID: 22798614
Hmm, I said it because, at least in my pc with Vista and nod32, when I work with hooks, it considers a malware and prevent it's execution...
0
 
LVL 28

Expert Comment

by:2266180
ID: 22799046
that depends what kind of hooking stuff you use. there are many on the net and some of them are incorrectly detected by antiviruses as malware.

you can use setwindowshookex winapi function for mouse and keyboard:
http://delphi.about.com/od/windowsshellapi/a/keyboard_hook.htm
http://delphi.about.com/od/windowsshellapi/a/mousehook.htm

file file creation you need to use code injection so you'll need a good library for that. I would suggest using madCodeHook but for some time madhis does not give it unless you're a good harted developer :)
so your alternatives are to test some free solutions like using the GINA stub or replacements:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20733197.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ventura_v
ID: 22803595
Yeah, I have a good component for code injection... But is there a way to make it run normally in Windows Vista?? It always blocks code injection and api hooks =\
The only hooks it doesn't block is the ones in setwindowshookex wm_...
0
 
LVL 28

Expert Comment

by:2266180
ID: 22803648
I don't have muich experience with vista. have you considered elevation?
you can also use the request attention link and ask the moderators to include this quesiton in a couple of other zones, something related to vista development.

here is a fast test for you to see if it will help: run your test program from the administrator account (not a user with admin, but the administrator account) and make sure you disable UAC. if it works, then it's all about configuring your applicaiton correctly. elevation plus enabling sufficient access rights (like debug priv, etc)
0
 

Author Comment

by:Ventura_v
ID: 22833433
Yeah, i've done that.... With UAC disabled and debug privileges it runs ok... But for other users it would be an obstacle making them disable UAC, restart windows and then run my app...
 
Since I can't disabel UAC with delphi code, they'll have to disable it manually... I guess it has to have some kind of manifest or something like that...
0
 
LVL 28

Accepted Solution

by:
2266180 earned 2000 total points
ID: 22835210
>> Yeah, i've done that [...] guess it has to have some kind of manifest or something like that..

either you done that, or you didn't. you do it via a manifest file. so, since you say you don't have one, I am assuming you didn't do that. (elevation).

that's first step when making vista applications :)
here are some PAQ's to help you choose the manifest that best suits your needs (there are also other vista & delphi related information that you might find usefull:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22755023.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22465261.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23083197.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22423950.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22566079.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22591892.html

after you read through all these PAQs, you should be able to understand a little how vista security works in reagrds to this UAC thing and what the manifest can do for you ;)
0
 

Author Comment

by:Ventura_v
ID: 22850805
That was exactly what I was looking for!!
 
Thanks ciuly =)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question