title: How to call a C++ dll file from Visual Basic 2010
body: <p>I'm using Microsoft Visual Studio 2010 Express: the C++ and VB versions.</p>
  
  <ul>
  <li>There is some VB code that forms the body of a program, and all the GUI.</li>
  <li>There is also some C++ code that does some fast processing (lots of loops).</li>
  </ul>
  
  <p>I am trying to call the C++ code, compiled as a dll, using:</p>
  
  <blockquote>
    <p><code>Private Declare Sub CalcGraph Lib "Model.dll" ()</code></p>
  </blockquote>
  
  <p><br/></p>
  
  <p>And at the moment keep getting the error:</p>
  
  <blockquote>
    <p>Unhandled exception has occurred in your application.
    Unable to find an entry point named 'CalcGraph' in DLL 'Model.dll'</p>
  </blockquote>
  
  <p>Could someone explain how to correctly call the DLL, please? <br/>
  Do you need any other information to better understand the problem? </p>
  
  <p>I'm fairly new to programming, so please be patient with me! <br/>
  That said, I'm prepared to do the leg-work, and have already spent quite a while reading around on this and other sites. Nothing seems to match quite well enough to help me understand what's going wrong.</p>