title: Can a loaded DLL know where it is located?
body: <p>I am building a DLL that is used by Office. When Office runs with it, I would like to identify where it is located. Is that possible?</p>
  
  <p>ex. of code within the DLL when it is run within Office:</p>
  
  <pre><code>// should return C:\tmp\officeaddin.dll, 
  // currently C:\Program Files\Microsoft Office\Office 12
  MessageBox.Show(Application.StartupPath)   
  </code></pre>