Solved

How to create events systemwide?

Posted on 2008-10-24
8
179 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
  • 4
  • 4
8 Comments
 
LVL 28

Expert Comment

by:ciuly
Comment Utility
that's simple: AFAIK, you cannot do it without hooks.
0
 

Author Comment

by:Ventura_v
Comment Utility
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:ciuly
Comment Utility
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
 

Author Comment

by:Ventura_v
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 28

Expert Comment

by:ciuly
Comment Utility
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
Comment Utility
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:
ciuly earned 500 total points
Comment Utility
>> 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
Comment Utility
That was exactly what I was looking for!!
 
Thanks ciuly =)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 89
Convert Jpg /PNG To GIF 5 102
Delphi : could not find program, '...exe' 2 115
Base1 Encode/Decode 3 21
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now