Dynamically loading client C++ dll using ACE_DLL giving error as Unhandled exception -


i want dynamically load client dll in c++ windows application. using ace_dll. want create object of class in client dll in application . have written wrapper class. 1 of member function creates object of ace_dll. using object loading client dll. next calling symbol function through ace_dll object , passing mangled name of constructor of class in client dll. next calling function pointer (_entry ) contains address of constructor time getting error "unhandled exception (access violation)"

please let me know if approach correct. below calling sequence in application.


ace_dll* _pdll; typedef test* (*testfp)(); testfp _entry;


_pdll = new ace_dll();

_pdll->open("dllname_to_be_opend");

std::string ssymbol = "test"; // mangled name of test class constructor in client dll

_entry = (testfp) _pdll->symbol(ssymbol.c_str());

test *obj = _entry(); // unhandled exception @ 0x00362b2f in testdll.exe: 0xc0000005: access violation writing location 0x00362b0c.


thank you, prasad

that looks right. can run ace_wrappers/tests/dll_test.exe? if works compare test code yours more closely.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -