Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to intercept a call into a DLL?

34 views
Skip to first unread message

Bob Altman

unread,
Feb 15, 2010, 7:53:01 PM2/15/10
to

Hi all,

I have a 3rd-party DLL that exposes a bunch of functions. I want to
intercept calls into that DLL to add some processing of my own before and
after the 3rd-party DLL has a chance to execute.

I seem to recall seeing an article (either in MSDN Magazine or CODE
Magazine) that said that Microsoft now had a supported API for doing this
sort of thing, but I can't track down the API. Any suggestions?

(BTW, I'm posting this here because this seems to me to be the sort of thing
a debugger guru would know something about. Maybe I'm in a completely wrong
NG...)

Kalle Olavi Niemitalo

unread,
Feb 16, 2010, 1:36:03 AM2/16/10
to
Bob Altman <r...@nospam.nospam> writes:

> I have a 3rd-party DLL that exposes a bunch of functions. I want to
> intercept calls into that DLL to add some processing of my own before and
> after the 3rd-party DLL has a chance to execute.
>
> I seem to recall seeing an article (either in MSDN Magazine or CODE
> Magazine) that said that Microsoft now had a supported API for doing this
> sort of thing, but I can't track down the API.

That API may be Detours:

http://research.microsoft.com/sn/detours
http://www.microsoft.com/about/legal/en/us/IntellectualProperty/IPLicensing/Programs/Detours.aspx

Seems a bit expensive though.

Bob Altman

unread,
Feb 16, 2010, 2:34:31 PM2/16/10
to
Thanks, that's just what I was looking for!


0 new messages