title: Unable to find an entry point named
body: <p>I am coding an application in c# that makes use of a third-party dll coded in cpp. I make several calls to the dll, and they all are working except for one. </p>
  
  <p>My code makes the call in the following manner:</p>
  
  <pre><code>return ObjectGetStringEntryID(pObject, strEntryID, strEntryID.Capacity);
  
  [DllImport(EXTERNAL_DLL, CharSet = DefaultCharSet)]
  protected static extern bool ObjectGetStringEntryID(IntPtr pObject, StringBuilder strEntryID, int nMaxLength);
  </code></pre>
  
  <p>Since I have access to the source code, I know it contains the following definition:</p>
  
  <pre><code>BOOL ObjectGetStringEntryID(CMAPIObject* pObject, LPTSTR szEntryID, int nMaxLength)
  </code></pre>
  
  <p>As stated before, I make several other calls to this dll using the same format, and they are successful. </p>
  
  <p>Consequently, I have the following setting if it helps:</p>
  
  <pre><code>public const CharSet DefaultCharSet = CharSet.Ansi;
  </code></pre>
  
  <p>Does anyone see what I may be doing wrong in my call? From the same class, I call:</p>
  
  <pre><code>MessageGetSubject(pObject, strSubject, strSubject.Capacity);
  
  [DllImport(EXTERNAL_DLL, CharSet = DefaultCharSet)]
  protected static extern void MessageGetSubject(IntPtr pMessage, StringBuilder strSubject, int nMaxLength);
  </code></pre>
  
  <p>Which matches up to the method:</p>
  
  <pre><code>void MessageGetSubject(CMAPIMessage* pMessage, LPTSTR szSubject, int nMaxLength)
  </code></pre>
  
  <p>This comes from the same classes in both c# and cpp as the call that is not working, but it works just fine. There does not appear to be any difference in how it is called, so they both should either work or not work. </p>
  
  <p>If anyone has any insight into what I am doing wrong, I would greatly appreciate the assistance.</p>