The problem with that aproach would be that the functions are in another location in the export table.<div>I've read that the locations need to stay exactly the same.</div><div>Am I wrong about this?<br><br><div class="gmail_quote">
2011/4/18 Robert Jacques <span dir="ltr"><<a href="mailto:sandford@jhu.edu">sandford@jhu.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>
<div></div><div class="h5">On Sun, 17 Apr 2011 16:09:02 -0400, maarten van damme <<a href="mailto:maartenvd1994@gmail.com" target="_blank">maartenvd1994@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone, this is my second post in the digitalmars.d newsgroup and I<br>
hope it gets as good support and suggestions as my first post :)<br>
<br>
I'm playing around with the d programming language and am trying out some<br>
exotic things you normally would write in c++.<br>
Right now I'm trying to 'intercept' all calls from a program to a dll by<br>
renaming that dll and writing my own in d.<br>
In c++ you would write in the header file:<br>
#pragma comment(linker,<br>
"/export:exportfunction=nameofotherdll.dll.destinationfunction,@location")<br>
<br>
How could one write this in the d programming language?<br>
Asuming this has to be done with the pragma(lib,...) function but I don't<br>
really know how.<br>
<br>
thanks in advance,<br>
<br>
Maarten<br>
</blockquote>
<br></div></div>
I don't know of an automated way of doing this is D. pragma(lib,...) exists, but it simply loads a specified static library. (i.e. to simplify linking/ project setup, etc). Personally, I'd just export extern(C)/extern(System) functions toa DLL, and link in a manually define the renamed DLL using a .def file and implib.<br>

</blockquote></div><br></div>