delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/21/03:07:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 21 Dec 2001 08:05:07 +0000 (GMT)
From: Matthew Brett <matthew DOT brett AT mrc-cbu DOT cam DOT ac DOT uk>
To: cygwin AT cygwin DOT com
Subject: Linking dlls
Message-ID: <Pine.GSO.4.21.0112210747320.26202-100000@sabik>
MIME-Version: 1.0

Hello again,

I made an error in my earlier question, so please forgive the repost. 

My question is: is there a way that I can link a dll function 'foo' to
a routine in code called 'bar'.

So, I have a dll, extdll.dll, which exports a routine 'foo'.  I don't
have the source for the dll.

I also have a very large body of code, in which the routine 'foo' is
called many times.  However, in the code, the routine, which is
actually 'foo', is always called with the name 'bar'.  For reasons it
is not worth going into, I can't change the code.

I need to link the code, so that calls to 'bar' generate calls to
'foo' in mydll.dll.  Is there any way I can do this?  I had a go with
linker scripts, but didn't get far.

I have had a look at dlltool, which can do aliasing of function names
in a dll, but I think this only works by modifying the compilation of
the dll, which is not open to me, as I do not have the source.

Many thanks for any help, 

Matthew 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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