title: VB6 declaration for C++ function gives "Bad DLL calling convention"
body: <p>What is the correct VB6 declaration for this C++ function?</p>
  
  <pre class="lang-cpp prettyprint-override"><code>LPCWSTR* MW_ListReaders(_ULONG Context, int* NumberOfReaders);
  </code></pre>
  
  <p>The following gave me "Bad DLL calling convention":</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Declare Function ListReaders Lib "MyDLL.dll" (ByVal Context As Long, _
                                                      ByRef NumberOfReaders As Integer) As Long
  </code></pre>