News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Quick Hook Question

Started by Krozgen, December 17, 2005, 07:34:18 AM

Previous topic - Next topic

Krozgen

I've seen Iczelion's tut 24, and I've been over codeproject and this forum as well; that's not to say I didn't miss something (in fact, I'm sure I did :-P), I'm just trying to say that I did try looking.

Unfortunately, no one seems to have a really good assembly hooking tutorial. Icz's is great for a system wide one, but not hooking into a specific remote process (thread?). My end goal is to hook into Winamp, and each time the WM_SETTEXT message is sent (the track changed), I want to copy it into my program's list box. There isn't any code to post, because currently it's non-functioning. However, I'd like to know if there's a good, specific, well written assembly hooking tutorial out there for hooking into a specific remote process?

Also, are there any suggestions on which type of hook to use? I thought I'd go with a WH_MSGFILTER, since Icz describes it as "... called when a dialog box, menu or scrollbar is about to process a message. This hook is local. It's specifically for those objects which have their own internal message loops." Well, winamp has a message loop, and I'd like to hook into it. So... yes... any suggestions, comments, critiques, whatever are welcomed :) Thank you.

zooba

A Winamp plugin is probably a better way to go for this application. I'm not 100% certain that modern versions of Winamp use standard window messages anymore - Nullsoft have a developers section on the winamp website. It might be worth checking that out. :U

Cheers,

Zooba

Krozgen

Bah, hehe... everyone tells me there's another way; it's really not so much the program's usefulness that I'm interested in, much rather learning the assembly aspect. If I learn how to monitor remote messages via hooks, then when it's the right time to use them, I'll be able to :)

As to whether or not winamp uses standard windows messages - there has to be some message :) Using Spy++, I found the Settext method when the song changes; I know it's there, it's simply a matter of hooking it.

Please let me know; thanks.