Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > accessing a fun...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 43741 of 47925
Post > Topic >>

accessing a function from DLL

by "AS" <AS@[EMAIL PROTECTED] > Mar 7, 2008 at 04:24 PM

Hi ,

I have ex****ted the following  function from a dll ,

extern "C" DECL_MYEX****TS LRESULT CALLBACK MouseProc(int nCode,WPARAM 
wParam,LPARAM lParam);



//in my calling code , I tried to access the function as below:

static HINSTANCE hinstDLL;

typedef LRESULT (CALLBACK *MOUSEPROC)(int nCode,WPARAM wParam,LPARAM 
lParam);  // typedef a function pointer to access the function

hinstDLL =
LoadLibrary(_T("F:\\inter\\MyFirstDll\\debug\\MyFirstDll.dll")); 
//hInstDLL is  valid

MOUSEPROC hproc = (MOUSEPROC)GetProcAddress(hinstDLL,"MouseProc");  //
hProc 
is still NULL



Question:   I'm not able to access the function thru GetProcAddress. Is
the 
typedef  "typedef LRESULT (CALLBACK *MOUSEPROC)(int nCode,WPARAM 
wParam,LPARAM lParam); "   is corect or what is goin wrong here ?



Thanks



Sudhakar
 




 4 Posts in Topic:
accessing a function from DLL
"AS" <AS@[EM  2008-03-07 16:24:26 
Re: accessing a function from DLL
Tom <newsgroups423@[EM  2008-03-07 07:32:25 
Re: accessing a function from DLL
"AS" <AS@[EM  2008-03-10 10:45:22 
Re: accessing a function from DLL
Tom <newsgroups423@[EM  2008-03-12 03:35:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 17:32:53 CDT 2008.