16,548
社区成员




extern "C" __declspec(dllexport) bool DllInit(HINSTANCE hInst);
extern "C" __declspec(dllexport) void DllUnInit();
...
extern "C" __declspec(dllexport) bool DllInit(HINSTANCE hInst,LONG cx,LONG cy)
{
if (m_pEngine)
return false;
if (!m_pEngine)
m_pEngine = new CGameEngine(hInst,cx,cy);
if (!m_pEngine)
return false;
return true;
}
uninit
extern "C" __declspec(dllexport) void DllUnInit()
{
if (m_pEngine)
{
delete m_pEngine;
m_pEngine = NULL;
}
}
时间一长我都忘了自己怎么解决的了。
extern "C" __declspec(dllexport) CXXXConfig * GetXXXConfig()
{
return new CMyConfig;
}