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 

Mixing Pascal/C++ code in a DLL -- Calling conventions

 
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: Tue Jun 14, 2005 7:26 pm    Post subject: Mixing Pascal/C++ code in a DLL -- Calling conventions Reply with quote




Hi, I used to have 2 libraries, 1 was a Delphi (Pascal) DLL and the
other a C++ library. I would use the following decleration to call into
the C++ DLL from the Delphi DLL:

function cppfunc(Size: Integer): Pointer; cdecl; external 'cpp.dll;


These libraries have since been combined into a single DLL which has
both Pascal and C++ in ot. But I can't figure out how to call the C++
code from the Pascal code. I keep getting syntax errors on the
following:


function cppfunc(Size: Integer): Pointer; cdecl;


I removed the 'external' because the function is no longer external.


How can I make a function call from Pascal code into C++ code within
the same DLL?

ANy help appreciated.


Thanks, Jack

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.