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 

Re: Export a function from a C++Builder DLL

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





PostPosted: Sun Nov 27, 2005 7:54 am    Post subject: Re: Export a function from a C++Builder DLL Reply with quote



Your questions belong to:
borland.public.cppbuilder.language.cpp

Follow-up set.

"Danijel Tkalcec [RTC]" <dtkalcec (AT) hotmail (DOT) com> wrote

Quote:
Now I'm completely lost. Searched the internet and gone through the Help
files, but I can't find a simple example on how to export a "stdcall"
function from a C++ Builder DLL (I need to create an ISAPI with C++
Builder). Using the "exports" clause inside the unit doesn't do the
export, so I guess it has to be declared in the main Project file or the
DLL. But ... how do I do this?

In Delphi, it's as simple as ...

exports MyFunction;

Does someone know how to do the same in C++ Builder?

--
Danijel Tkalcec



Back to top
Michel Leunen
Guest





PostPosted: Sun Nov 27, 2005 10:25 am    Post subject: Re: Export a function from a C++Builder DLL Reply with quote



"Danijel Tkalcec [RTC]" <dtkalcec (AT) hotmail (DOT) com> wrote in message

Quote:
Now I'm completely lost. Searched the internet and gone through the Help
files, but I can't find a simple example on how to export a "stdcall"
function from a C++ Builder DLL (I need to create an ISAPI with C++
Builder). Using the "exports" clause inside the unit doesn't do the
export, so I guess it has to be declared in the main Project file or the
DLL. But ... how do I do this?

In Delphi, it's as simple as ...

exports MyFunction;

Does someone know how to do the same in C++ Builder?


Look here for an explanation on how to create and use DLL with C++Builder:

http://users.deltacomm.com/edmulroy/howto10.htm

Note that the WINAPI convention is equivalent to __stdcall (it's a typedef)

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------

Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Sun Nov 27, 2005 3:40 pm    Post subject: Re: Export a function from a C++Builder DLL Reply with quote



At 11:25:31, 27.11.2005, Michel Leunen wrote:

Quote:
Note that the WINAPI convention is equivalent to __stdcall (it's a
typedef)

Actually, it is a macro. <g>

--
Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de

"I'm in shape. Round is a shape." -- George Carlin

Back to top
Ed Mulroy
Guest





PostPosted: Sun Nov 27, 2005 4:34 pm    Post subject: Re: Export a function from a C++Builder DLL Reply with quote

Quote:
Note that the WINAPI convention is equivalent to __stdcall (it's a
typedef)

Minor nitpick.

No, it is not a typedef. The use of WINAPI on that page is very deliberate.

Microsoft documentation shows WINAPI in the help on the Windows API
functions. Other companys' docs also use it. People will learn from that
page. It seemed reasonable to present things on the page in a manner
consistent with what they will see elsewhere.

What the macro resolves to is also shown in that page, howto10.htm:

--------------------------
WINAPI is a macro in the Windows header files.

#define WINAPI __stdcall

The keyword __stdcall specifies a type of calling convention (more
about calling conventions below...
--------------------------

.. Ed

Quote:
Michel Leunen wrote in message
news:43898977$1 (AT) newsgroups (DOT) borland.com...

Look here for an explanation on how to create and use DLL with C++Builder:

http://users.deltacomm.com/edmulroy/howto10.htm

Note that the WINAPI convention is equivalent to __stdcall (it's a
typedef)



Back to top
Michel Leunen
Guest





PostPosted: Sun Nov 27, 2005 6:03 pm    Post subject: Re: Export a function from a C++Builder DLL Reply with quote

Rudy Velthuis [TeamB] wrote:

Quote:
Actually, it is a macro.

Ed Mulroy wrote:

Quote:
No, it is not a typedef.

Of course, you (both) are right.

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------

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.