c programming with dll

August 19, 2010 at 03:45:08
Specs: Windows Vista, 1,5GHz/2 GB
I would appreciate any help with the following problem i have.I want to call a function named fun1() from a dll named MyDLL.dll via C.The fun1 function is with no arguments and runs by reading a pat extension file which includes random numbers.thanks in advance for any advice

See More: c programming with dll

Report •

August 21, 2010 at 12:14:12
You *might* try something like

HINSTANCE hndDLL = LoadLibrary("path to\mydll");

if(hndDLL != NULL) {
   int (__stdcall* fun1)();
   fun1 = GetProcAddress(hndDLL,"fun1");

   fun1(); // call it

I have no aspiration for preaching. ;-)

Report •
Related Solutions

Ask Question