Hooks, Subclassing, and IPCs

Started by
4 comments, last by Thrasy 22 years ago
Hey! I am trying to find some decent articles, tutorials, and sample code on hooks, subclassing, and ipc. I have already exhuasted most of my favorite sites and search engines so I am really hoping that one of you has seen something good out there that I have missed. One thing that I really need is a lot of explanation. I am still on the road to gaining win32 competancy so detailed explanations add a lot value to an example for me.
Advertisement
Unless you have more specific questions, odds are you''re not gonna get much more help than "STFW" here. For IPCs at least, MSDN''s article called "Inter Process Communication" lays out all your (Windows) options for you.
Thanks.

With regards to hooks and subclassing, what I am looking for are clear definitions, examples of uses, and other important information such as well known pitfalls, common methods for reducing overhead, and any relative warnings.

I am not really looking for very basic implementation code such as can be found in MSDN or anything too terribly nasty. I am not worried about how to implement something like system wide hooks... yet...

As for IPCs, I guess I am just looking for some simple examples demonstrating different methods that are less microsofty and more useful.
There is no IPC in C or C++ because the languages don''t support multiple processes--that''s a function of the operating system and therefore OS-specific libraries. If you''re in Windows then those methods listed in the IPCS article are your choices unless you use some 3rd party stuff (which surely uses those methods in some sort of wrapper).

MSDN is actually mostly articles in addition to a language reference, and with not much actual code. I guarantee it has articles talking about what you''re asking. Look there.
IIRC, a window can only be subclassed from within the same process. I can envision a few methods for getting around this, but they''re not simple. Another topic you might look into is ''code injection'' - Jeff Richter writes about it in his book "Programming Applications" and there''s the MS Research project named "Detours" (iirc) to look into as well - but both of those are pretty heavy subject matter. Learn about how to write (and debug) dlls. Learn about hooks (there''s a nice sample on the winprog.org faq page), learn about the various win32 ipc mechanisms (dde,memmapping,pipes,wm_copydata, etc) and get a good feel for all this first before moving on to the truly hard core stuff. Have fun!
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Thanks guys, I appreciate your responses.

Indeed code injection is the topic that I am interested in, but I think I have learned enough now to agree that I really need to work a lot more with my own processes before harnessing those outside of my control.

Oh and by less microsofty I really meant less segmented and frustrating to browse not gear for other os''s. MSDN almost always has what I am looking for it just has it in twenty pages of two paragraphs each. I guess I am getting to the point that I will just have to learn to appreciate it something akin to learning to appreciate why on earth I would want to use MS code to begin with...

Thrasy

This topic is closed to new replies.

Advertisement