Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C++ dll in C# code
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01599867
Message ID:
01599933
Vues:
130
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform