title: Calling DLL functions from VB6
body: <p>I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem?</p>
  
  <p>I've declared all my public functions as follows:</p>
  
  <pre><code>#define MYDCC_API __declspec(dllexport)
  
  
  MYDCCL_API unsigned long MYDCC_GetVer( void);
  .
  .
  .
  </code></pre>
  
  <p>Any ideas?</p>
  
  <hr>
  
  <p>Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful:</p>
  
  <p><a href="http://www.codeproject.com/KB/DLL/XDllPt2.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/DLL/XDllPt2.aspx</a></p>
  
  <p>Also, I had a few problems passing strings to the DLL functions, I found this helpful:</p>
  
  <p><a href="http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml" rel="nofollow noreferrer">http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml</a></p>
  
  <hr>