>I downloaded the other project, which I think uses the same thing:
>
>
>EXTERN_C LPCTSTR Invoke1 (LPCTSTR szIn)
>{
> AFX_MANAGE_STATE(AfxGetStaticModuleState());
> theApp.ProcessCall(CString(szIn), theApp.m_csRet);
> return theApp.m_csRet;
>}
>
The code I gave earlier should work for this signature. LPCTSTR should automatically map to the string type.
Is it possible your code is set to compile for 64 bit (or the platform target is set to Any CPU) but the DLL you're calling is 32-bit? Not sure what the behavior would be in that case.