|
-
October 10th, 2005, 06:18 AM
#1
What are Hooks in software terms
I keep hearing the term hooks, used in software, and I was wondering if someone could explain the concept behind hooks to me?
-
October 10th, 2005, 06:30 AM
#2
Re: What are Hooks in software terms
under windows OS you can read here:
Hooks
Cheers
-
October 10th, 2005, 06:33 AM
#3
Re: What are Hooks in software terms
 Originally Posted by davejohnston83
I keep hearing the term hooks, used in software, and I was wondering if someone could explain the concept behind hooks to me?
In few words: Generally, hooks are predefined points in the execution flow of a system into which you can "hook" your own processing. This is usually done by providing a way for you to supply callback function pointers (C) or by means of virtual functions you can implement (C++).
As an example under Windows: Normally, all user actions (mouse clicks, keyboard input) are handled by the system and dispatched to the affected windows, where they arrive in the form of messages. However, Windows provides a way for application programmers to hook into this procedure (via the SetWindowsHookEx API): It allows you to provide a pointer to a callback function which is called each time the system is about to process a mouse message, and gives you a chance to see, handle, change or suppress that message before application windows (or other clients in the hooking chain) get to see them.
-
October 10th, 2005, 06:58 AM
#4
Re: What are Hooks in software terms
Thats great guys, thanks - another question cleared up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|