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
Post a Comment