2015-01-22
03:44 PM
- last edited on
2023-08-01
01:52 PM
by
Doreena Deng
if (e.GetSource() == &m_btnTest) {
typedef IKlass* (__cdecl *iklass_factory)();
HINSTANCE dll_handle = ::LoadLibrary(TEXT("BCWebSDK.dll"));
if (!dll_handle) {
}
// Get the function from the DLL
iklass_factory factory_func = reinterpret_cast<iklass_factory>(::GetProcAddress(dll_handle, "create_klass"));
if (!factory_func) {
::FreeLibrary(dll_handle);
}
IKlass* instance = factory_func();
std::vector<int> info = instance->data(); // This is what I need from dll and it works fine
instance->destroy();
::FreeLibrary(dll_handle);
}
2023-02-28 09:47 PM
Hi! Were you able to fix this error? I'm getting the same exception when using libcpr (DLLss are in Archicad.exe folder, and LIBs are properly linked at "Aditional Dependencies").