 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Uffe Kousgaard Guest
|
Posted: Sun Nov 27, 2005 7:54 am Post subject: Re: Export a function from a C++Builder DLL |
|
|
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
|
Posted: Sun Nov 27, 2005 10:25 am Post subject: Re: Export a function from a C++Builder DLL |
|
|
"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
|
Posted: Sun Nov 27, 2005 3:40 pm Post subject: Re: Export a function from a C++Builder DLL |
|
|
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
|
Posted: Sun Nov 27, 2005 4:34 pm Post subject: Re: Export a function from a C++Builder DLL |
|
|
| 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
|
Posted: Sun Nov 27, 2005 6:03 pm Post subject: Re: Export a function from a C++Builder DLL |
|
|
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 |
|
 |
|
|
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
|
|