c++和c#相互调用可以采用哪种方式?
作了一个项目c#写的,实现了remoting和其他c#程序通信,但目前还需要和c++工程相互调用。请高手支招。
------解决方案--------------------最好封装成dll、ActiveX、Atl等再调用   
 #using  <mscorlib.dll>   
 #include  <vcclr.h>   
 using namespace System;    
 class CppClass {  
 public:  
    gcroot <String*>  str;   // can use str as if it were String*  
    CppClass() {}  
 };    
 int main() {  
    CppClass c;  
    c.str = new String( "hello ");  
    Console::WriteLine( c.str ); // no cast required  
 }  
 Output  
------解决方案--------------------路过、学习~ 
------解决方案--------------------标记一下
------解决方案--------------------up
------解决方案--------------------封装成DLL 然后dll import调用不可以么?
------解决方案--------------------是DLLImport
------解决方案--------------------Web service
------解决方案--------------------用C++/CLI写一个中间层DLL
------解决方案--------------------最好封装为COM组件,C++调用就方便些,但是客户端还是需要装。NET框架 
 C#的DLL只能是vc7,VB。NET,C#可以用,c++用不了   
 如果用WEB SERVICE也可以,不过c++调用会比较麻烦,但不需要。NET框架 
------解决方案--------------------转换成COM吧,vc6就可以调用了