This is the mail archive of the cygwin@cygwin.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]
Other format: [Raw text]

Linking dlls


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/


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