I've been studying C for awhile, and just finished my 2nd course (freshman year college) on data structures in C++. But for the life of me I cannot grasp hooks.
I've looked up tons of definitions on it, and from what I've read it's basically a function or something executed in between 2 functions or before one, and I've heard it's used before something such as machine functions or something to intercept messages sent between the user and machine, like mouse clicks, keyboard presses, etc.
I would appreciate any help I can, any examples or etc., a basic definition wouldn't really do it for me since that's all I could find, I'm looking for one in-depth.
I'm not really experienced with these messages sent in the computer, hence why I'm not exactly using the best terms to describe it.
That was one of the first places I looked, and while it does provide useful info, it doesn't give me help from a programmers perspective and actual examples.
That was one of the first places I looked, and while it does provide useful info, it doesn't give me help from a programmers perspective and actual examples.
I thought it was very informative; I don't quite know how to make it more so...
inside any program, a function is invoked through an address - if you maintain the protocol (arguments, etc...) but change the address, you can intercept the call and make that program do something else; that's all hooking is.
if that still doesn't make sense, you need to study more about linkers and address spaces or ask your professor to explain.
edit: besides for debugging purposes and low-level OS purposes, hooking is just a hack; not worth getting hung up on