BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi vs C++ Mangling (qqrpvi vs qpvi)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Jack Dao
Guest





PostPosted: Thu Jun 09, 2005 2:30 pm    Post subject: Delphi vs C++ Mangling (qqrpvi vs qpvi) Reply with quote




Hi, sorry if this is posted again, but I posed this 24 hours
ago but I do not see it coming across, So I post again.


I am trying to develop a library in C++ using Builder6 to
replace a library that was written in pascal. Now the origina
pascal library has it's functions managled differently than our
cooresponding functions written using the C++ compiler. For
example:

The pascal names are as follows:

@classname@functionname$qqrpvi

And the closest I can get in C++ is the following:

@classname@functionname$qpvi

The problem is that the pascal compiler appends a '$qqrpvi' to
the function name where the C++ compiler appends a '$qpvi' to the
function name.

I need to plug this C++ library into place without rebuilding
the original binaries, and for me to do this I need to be able to
create a library that has the exact same mangled names as the
original library.

- Is there any way I can compile/link a C++ library to do
this?
- Is there any way I can 'edit' the C++ library to change the
mangled names to what I need?

Any help apprecieated.


Thanks, Jack

Back to top
Jack Dao
Guest





PostPosted: Mon Jun 13, 2005 2:24 pm    Post subject: Re: Delphi vs C++ Mangling (qqrpvi vs qpvi) Reply with quote





Perhaps some confusion on the mangling, but I am using Microsofts tool
called Dependency Walker to get the mangled named from the DLL's. Using
this tool, one can see that the Pascal code is mangling the function
names differently than the C++ compiler.

The Pascasl compiler is adding a '$qqrpvi' to the functio names, and
the C++ compiler is adding a '$qpvi' to the function names.

Given this, is there anyway I can develop a C++ DLL and use it as a
binary replacement for a DLL that was developed using the pascal
compiler?


THanks, Dan

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.