4 개의 내 보낸 함수가있는 C++ DLL이있는 경우 DLL이로드 될 때 클래스의 객체를 구성하는 가장 좋은 방법은 (LoadLibrary
까지) 어떤 클래스에서든지 해당 클래스의 public 메서드에 액세스 할 수있는 방법입니다 수출 된 기능 (extern "C" __declspec(dllexport)
에 의해 수출). 나는 세계적인 것이 악하다고 기억한다. (다음은 가장 좋은 방법은 아니다) 다음을 수행하는 더 나은 방법을 찾고DLL의 내 보낸 함수에서 액세스 할 수있는 방식으로 C++ DLL에서 클래스 개체를 구성하는 가장 좋은 방법은 무엇입니까?
: 모든
namespace namespace_top_of_CMS_DLL{
CMS CMS_Object =CMS();
CMS*CMS_Ptr_Object =&CMS_Object;
}
extern "C" __declspec(dllexport)
void OPS_CMS_DLL_runFullStructure(){
namespace_top_of_CMS_DLL::CMS_Ptr_Object->runFullStructure();
}
extern "C" __declspec(dllexport)
void OPS_CMS_DLL_runSubStructures(){
namespace_top_of_CMS_DLL::CMS_Ptr_Object->runSubStructures();
}
extern "C" __declspec(dllexport)
void OPS_CMS_DLL_runReducedStructure(){
namespace_top_of_CMS_DLL::CMS_Ptr_Object->runReducedStructure();
}