title: Cannot Load C++ DLL in C#
body: <p><a href="https://stackoverflow.com/questions/734140/c-crash-when-loading-c-dll">&gt;My previous thread&lt;</a></p>
  <p>I created this one,because I installed WinXP on VMBox and I cannot get it working again.</p>
  <p>This time I created an OnLoad Event on my form</p>
  <pre><code>        if (LoadLibrary(&quot;blowfish.dll&quot;) == 0)
          {
              Misc.LogToFile(&quot;Could not load dll&quot;, true);
              Application.Exit();
          }
  </code></pre>
  <p>Runs fine on my PC,but on VMBox LoadLibrary returns 0.</p>
  <p>Some users mentioned that the problem would be in mixing older NET Framework(2.0) with dlls made on newest MS Visual studio(2008 SP1) so I took action and now the program properties it's set to work with NET 3.5</p>
  <p>On the VMBox I have NET 2.0,but this is not the problem - the program itself runs fine.I also have C++ Redistributable(2005,2005 SP1 and 2008).</p>
  <p>What could be the problem?</p>