title: How to put a relative path for a DLL statically loaded?
body: <p>I have a DLL made in Delphi 7/Windows XP that I want to statically load in a host application on Windows (made in Delphi, too). I am using this line of code:</p>
  
  <pre><code>procedure Prepare_HTML_Email(var MailMessage : TIdMessage;
    const FileAddress, aDetail, aAlarmType : String); stdcall; external DLL_ADDRESS;
  </code></pre>
  
  <p>where <code>DLL_ADDRESS</code> must be the location the DLL is. But at this point I have a problem. The host application is a service, so it is running in <code>C:\WINDOWS\System32</code>, but I want to put the DLL in another directory, not in <code>C:\WINDOWS\System32</code>. The "external" keyword doesn't let to follow it with a function, it only admits a constant expression. So, How can I get the path of the DLL?</p>