Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > What is a hook

Reply
Thread Tools

What is a hook

 
 
Mohammad
Guest
Posts: n/a
 
      11-08-2003
Can someone explain to me what a hook is?

Does it has something to do with a debugger?

Thanks
 
Reply With Quote
 
 
 
 
Moonlit
Guest
Posts: n/a
 
      11-08-2003
Hi,


"Mohammad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Can someone explain to me what a hook is?

A hook is a function that is executed somewhere in between or before another
function. For instance in windows you can place a hook (function) which will
receive all mouse movements. One can use this to create macro's. (I did
something like this in my free frachunt program). I redirected all mouse
messages to my function first (and forwarded them to the function that
originally would receive them) so I could 'replay' them later when the user
asked for it.

>
> Does it has something to do with a debugger?


It has nothing to do with a debugger.

>
> Thanks


Regards, Ron AF Greve.


 
Reply With Quote
 
 
 
 
EventHelix.com
Guest
Posts: n/a
 
      11-08-2003
A hook generally a code stub left in the code to support a future
enhancement.

In general the so called design hooks end up cluttering the code. Checkout
the following article:
http://www.eventhelix.com/RealtimeMa...epItSimple.htm

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - Generate Sequence Diagrams and Use Case Diagrams in PDF
 
Reply With Quote
 
Mohammad
Guest
Posts: n/a
 
      11-09-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (EventHelix.com) wrote in message news:<(E-Mail Removed). com>...
> A hook generally a code stub left in the code to support a future
> enhancement.
>
> In general the so called design hooks end up cluttering the code. Checkout
> the following article:
> http://www.eventhelix.com/RealtimeMa...epItSimple.htm
>
> Sandeep


Is there a standard method of creating a hook, e.g., using a function pointer?

How is call to a function is intercepted but the hook function?

Can someone give a snippet of code?

Thanks
 
Reply With Quote
 
EventHelix.com
Guest
Posts: n/a
 
      11-10-2003
Hook is a general term to refer to any code written in the name
for future enhancement. That's all there is to it.

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - Generate Sequence Diagrams and Use Case Diagrams in PDF
 
Reply With Quote
 
John Gabriele
Guest
Posts: n/a
 
      11-11-2003
Mohammad wrote:
> Can someone explain to me what a hook is?
>
> Does it has something to do with a debugger?
>
> Thanks


I always thought that a "hook function" was some function that the
system/library/toolkit you are working with calls for you in an event-
driven setup.

Consider a GUI toolkit: a View::mouseDown() member function gets called
by the system for you when the user clicks the mouse in some given View.
You inherit from View and implement your own mouseDown(), but you never
explicitly call it yourself. It's a "hook" into the GUI toolkit, provided
for you by the designers of the toolkit.

---J

--
--- remove zees if contacting via email ---

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I "hook up" helper apps? kimcheeman Firefox 10 04-18-2005 10:17 PM
Missing URL Search Hook =?Utf-8?B?cGVyZmVjdDAwMDM=?= Wireless Networking 2 03-11-2005 03:01 PM
what event should I hook to for this? djc ASP .Net 7 11-23-2004 07:27 PM
HOOK REMOVAL SERVICE Jack Fish MCSE 4 07-27-2004 03:29 PM
Hook JScript Client Events to Server Controls David Pifer via .NET 247 ASP .Net 1 05-02-2004 04:58 PM



Advertisments