>>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.
That may be the problem. I know that dll is set for 32-bit and I have Any CPU for all 3 projects in that solution.
Do you suggest to change this to match?
If it's not broken, fix it until it is.
My Blog