delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/15/18:51:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <19990715224321.24409.qmail@hotmail.com>
X-Originating-IP: [212.52.67.147]
From: "Emanuele ALIBERTI" <ealiberti AT hotmail DOT com>
To: rbresner AT olf DOT com, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: More DLL fun! [fwd: ]
Date: Thu, 15 Jul 1999 15:43:20 PDT
Mime-Version: 1.0

> > 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019