This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: More DLL fun! [fwd: ]


> > I am trying to compare 2 pointers to functions.
> > All I am looking for is if they match or not.
> > The pointers are to a function.
> > The function is in a DLL, and the first place to get the
> > function pointer is in an exe.
> > The following is kind of a code sample (kind of but not really).

The behaviour is correct. I suppose you use an import library to call the 
DLL. The import library has stubs for each function the DLL exports and what 
you pass is the client process stub's address (the only known at link time). 
That is why your two pointers never match. You must explicitly get the 
relocated address of the function in the DLL by calling 
KERNEL32.GetProcAddress.


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]