title: Windows 7 OpenLDAP Curl DLL Dependency Hell
body: <p>I really hope someone can be of help to me because this problem has me totally stuck and frustrated.</p>
  
  <p>Yesterday I installed a fresh and shiney new Windows 7 x64 onto a development box.</p>
  
  <p>I got VS2008 installed, Tortoise SVN, did a checkout, compiled my currently project, all fine and dandy. </p>
  
  <p>But when I go to run (either F5 in VS or just running the exe from the shell) I get a dialog box that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/1797M.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1797M.jpg" alt="Sadness"></a><br>
  <sub>(source: <a href="http://www.aliparr.net/images/error1.jpg" rel="nofollow noreferrer">aliparr.net</a>)</sub>  </p>
  
  <p>So I fiddle around and can't see an obvious problem. I bust out depends.exe, thinking maybe there's a dll missing, and I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/HQXXz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQXXz.jpg" alt="Eeek"></a><br>
  <sub>(source: <a href="http://www.aliparr.net/images/error2.jpg" rel="nofollow noreferrer">aliparr.net</a>)</sub>  </p>
  
  <p>So I play, finding different versions of gpsvc.dll and ishims.dll and putting them in with the .exe, No luck.</p>
  
  <p>If I do a profile in depends (which follows the Output window of vs), I get this:</p>
  
  <pre><code>..
  Loaded "c:\windows\syswow64\ADVAPI32.DLL" at address 0x75F20000 by thread 1.  Successfully hooked module.
  
  Loaded "c:\windows\syswow64\LPK.DLL" at address 0x76B20000 by thread 1.  Successfully hooked module.
  
  Loaded "c:\windows\syswow64\USP10.DLL" at address 0x761C0000 by thread 1.  Successfully hooked module.
  
  Loaded "c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.DLL" at address 0x70570000 by thread 1.  Successfully hooked module.
  
  Loaded "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\OPENLDAP.DLL" at address 0x001E0000 by thread 1.  Successfully hooked module.
  
  Exited "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\SPREE.EXE" (process 0x5D4) with code -1073741701 (0xC000007B) by thread 1.
  </code></pre>
  
  <p>So it seems openldap.dll is the last thing to get loaded before it all goes wrong. I require this dll because I use cURL within the application to do a little JSON communicating...</p>
  
  <p>I've tried playing with moving files and trying differing dlls, but honestly I'm acting a little blind here. Can someone please help or point me in the right direction?</p>
  
  <p>It should be noted these dlls and setup work fine in Windows Vista x64 and x86 - is this a Windows 7 thing?</p>
  
  <p>Massive thanks in advance, I might still have some hair left after this is done. </p>
  
  <hr>
  
  <p>Edit</p>
  
  <p>I've now realised curl.exe dies in exactly the same way with openldap.dll - I guess some windows 7 issue?
  Can you/does anyone have a curl without the dependency on openldap? Is there another lightweight C/C++ library out there that'll let me fetch a document over http and do the odd http POST ?</p>
  
  <p>Thanks</p>