C++编译的Dll中需要使用单态类 供C#调用 求解
"TestDllC.h"
	public class TestDllC
	{
	private:
		int bb;
		static int pid;
		static TestDllC *pThis;
	private:
		TestDllC();
		~TestDllC();
		!TestDllC();
		static TestDllC();
	public:
		static TestDllC* GetInstance();
		int MessageSay();
	};
"TestDllC.cpp"
	TestDllC::TestDllC()
	{
		pid++;
	}
	TestDllC::~TestDllC()
	{		
	}
	TestDllC::!TestDllC()
	{
	//	delete pThis;  
	}
	static TestDllC::TestDllC()
	{
		pid=0;
	}
	static TestDllC* TestDllC::GetInstance()
	{
		if(pThis==NULL)
		{
			pThis=new TestDllC();//一个创建不复杂的类 所以不考虑线程安全
		}
		return pThis;
	//	return gcnew TestDllC();
	}
	int TestDllC::MessageSay()
	{
		return pid;
	}
类的示例如上,如何来做?
------解决方案--------------------
不行。在C#中不能调用。
1.把动态库改造成Com接口或者全部以方法引出,不要使用类。
2.自己使用C++再次封装,以方法引出。