Re: How to export afunction in class?
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 07 Feb 2007 11:12:37 -0500
No, but I rarely find that I need stdcall when calling the exported functions of a DLL.
Actually, let me rephrase that: I've never found a need to use stdcall when calling the
functions of a DLL. I trade off a couple extra instructions against the convenience and
robustness of using CDECL, and it means there is no real value to stdcall. So I've never
worried about it.
Why does stdcall make a difference? Unless you are in the inner loop of some intense
computation and calling your DLL on every iteration, the performance issue would never
matter. I'll trade off performance vs. convenience at this level any time, because I
don't need the performance when going into a DLL.
joe
On Wed, 07 Feb 2007 07:34:46 GMT, MrAsm <mrasm@xxxxxxx> wrote:
On Wed, 07 Feb 2007 01:07:02 -0500, Joseph M. NewcomerJoseph M. Newcomer [MVP]
<newcomer@xxxxxxxxxxxx> wrote:
In that case, you could use CDECL and it will all work right anyway.
joe
You're right that CDECL doesn't decorate names, but it has different
calling convention than STDCALL, so if I want the STDCALL's calling
conventions (e.g. called function pops its own arguments from the
stack) and I want no name decoration, I must use .DEF files.
Or is there another way to have STDCALL calling convention and no
decoration *without* using .DEF files?
Thank you
MrAsm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: How to export afunction in class?
- From: MrAsm
- Re: How to export afunction in class?
- References:
- How to export afunction in class?
- From: Lee Tow
- Re: How to export afunction in class?
- From: Joseph M . Newcomer
- Re: How to export afunction in class?
- From: MrAsm
- Re: How to export afunction in class?
- From: Joseph M . Newcomer
- Re: How to export afunction in class?
- From: MrAsm
- How to export afunction in class?
- Prev by Date: Re: Escape key
- Next by Date: Re: CRITICAL SECTION Help!
- Previous by thread: Re: How to export afunction in class?
- Next by thread: Re: How to export afunction in class?
- Index(es):
Relevant Pages
|