title: Non-activeX DLL in a VB6 application fails to load in Outlook 2010
body: <p>I have a VB6 app that utilizes a non-activeX DLL (non-registering).</p>
  
  <p>It's declared via the classic <code>Public Declare Function "Function Name" Lib "Library.DLL"</code> syntax.</p>
  
  <p>On my dev machine (XP) it works fine but when I deploy to Vista or Win7 I'm constantly greeted with a Run Time Error 48 - File Not Found for the DLL in question.</p>
  
  <p>I have tried copying that DLL to every directory I can think of including every environment path on the test machine and the app path too.</p>
  
  <p>These are all 32-bit test environments so it's not a SysWow64 issue.</p>
  
  <p>Possibly throwing a wrench into the mix is the fact that the application in question is an Outlook COM Addin.</p>
  
  <p>I managed to install VB6 on Win7 and was able to run a tiny sample app that utilizes this DLL (outside of the Outlook process) so I know it works PROVIDED the DLL is located in App path.  If I call <code>App.Path</code> from my DLL when I run it on the test environment it shows, to no surprise, my installation directory however the DLL is there.</p>
  
  <p>I tried turning off UAC.  I tried making the <code>App.Path</code> directory permissions open to everyone, still no dice.</p>