c++ - GetProcAddress and Function pointers - Is this correct? -


i having problem accessing method in dll file. method attempting access of type.

int dstoch (float,float,float,float,float,float,float,float,float); 

this code using

typedef int (*lpmyfunct)(float,float,float,float,float,float,float,float,float);  hinstance hdll = null; lpmyfunct lpdstoch;  hdll = loadlibrary("c:\\myfile.dll");  if(hdll!=null) {     std::cout << "library loaded \n";     lpdstoch = (lpmyfunct)getprocaddress((hmodule)hdll, "dstoch");      int res = lpmyfunct(1,2,3,4,5,6,7,8,9); //this getting error } 

the compile time error states : a value of type lpmyfunct cannot used initialize entity of type int

any suggestions on why wont accespt 9 parameters ?

replace lpmyfunct lpdstoch.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -