www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Detours and D?

reply dennis luehring <dl.soluz gmx.net> writes:
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

btw: can the function injection stuff work with D functions?
Apr 27 2008
parent reply "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Sun, 27 Apr 2008 20:39:19 +0300, dennis luehring <dl.soluz 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. -- Best regards, Vladimir mailto:thecybershadow gmail.com
Apr 27 2008
parent reply Neal Alexander <wqeqweuqy hotmail.com> writes:
Vladimir Panteleev wrote:
 On Sun, 27 Apr 2008 20:39:19 +0300, dennis luehring <dl.soluz 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.
Apr 28 2008
parent Neal Alexander <wqeqweuqy hotmail.com> writes:
Neal Alexander wrote:
 Vladimir Panteleev wrote:
 On Sun, 27 Apr 2008 20:39:19 +0300, dennis luehring <dl.soluz 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.
Theres also a D binding for madChook (www.madshi.net) too btw. He changed the licensing of it a while back though, so theres no free version anymore afaik.
Apr 28 2008