Detours and D?

Neal Alexander wqeqweuqy at hotmail.com
Mon Apr 28 00:29:38 PDT 2008


Vladimir Panteleev wrote:
> On Sun, 27 Apr 2008 20:39:19 +0300, dennis luehring <dl.soluz at gmx.net> wrote:
> 
>> hi
>>
>> is there a working binding for Microsofts Detours Library available for
>> D? or better ask - have someone already written one?
>>
>> http://research.microsoft.com/sn/detours/
>>
>> ciao dennis
> 
> Someone (N. Alexander) has written a hooking framework for D, but the website is offline now:
> http://destroy.selfip.org/kong/
> 
> Here's an old package I downloaded when it was announced:
> http://thecybershadow.net/dump/ca7d502e8db8d670f369bb4c23c2646a/kong_010.zip
> (the license is public domain)
> 
>> btw: can the function injection stuff work with D functions?
> 
> While your choice of words doesn't make your question clear for me, I'll say that I've successfully integrated C/C++/Delphi programs with my D code using code hooks. In some cases you may need to write bridges between different calling conventions in assembly.
> 
Yea the HDD died on that machine haha.

Anyway, the projects been on dsource for a while:
http://www.dsource.org/projects/kong

I dont think anyone uses it though lol. The SVN version there is 
slightly out of sync with my local copy. (Its just minor changes to 
imports that diddnt work on a certain OS / compiler combination. Also 
theres a string that needs to be .dup'd somwhere in the Portable 
Executable parsers section table lookup).

If you need help getting it to work, or have comments about making the 
API suck less feel free to email me.


The local source tree of it seems pretty stable. I havent seen any 
issues with it after using the code for a year or so.






More information about the Digitalmars-d mailing list