From: Giovanni Dicanio on
"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio
news:qr69l59iuos4e5bhuapn15u0tv7o9quc93(a)4ax.com...

> "Kernel" includes KRNL32, USER32, GDI32, ADVAPI32 and several other DLLs
> that constitute
> the formal "Win32 Interface".

I thought "Kernel" was only "kernel32.dll".


> Note that WINAPI is NOT NECESSARILY the same as __stdcall.
> __stdcall is an implementation specification; WINAPI is an abstract
> interface, which this
> week, for the x86, happens to translate as __stdcall. If you want
> __stdcall, you ask for
> __stdcall. You should not be using a Microsoft-defined abstraction if the
> intent is to
> use __stdcall.

OK, I understand your point and agree.

> Note that I said the choice of "WINAPI" was bad. I did *not* say the
> choice of __stdcall
> was bad.

Got it.


> The choice of __stdcall was bad for a different reason: the names are not
> easily used by
> GetProcAddress, but that is not related to the use of the symbol WINAPI.
>
> Note that .DEF files have nothing to do with this. A .DEF file will
> eliminate the need
> for __declspec(dllexport), but at considerable inconvenience. But .DEF
> files are for the
> linker; they don't tell the compiler how to generate the calling sequence.

I don't agree with this point.

My point was: if you want to use __stdcall *and* don't want name decoration
for global exported functions, to my knowledge, the only option is to use
..DEF files.

Giovanni


From: Joseph M. Newcomer on
See below...
On Mon, 18 Jan 2010 19:20:41 +0100, "Giovanni Dicanio"
<giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote:

>"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio
>news:qr69l59iuos4e5bhuapn15u0tv7o9quc93(a)4ax.com...
>
>> "Kernel" includes KRNL32, USER32, GDI32, ADVAPI32 and several other DLLs
>> that constitute
>> the formal "Win32 Interface".
>
>I thought "Kernel" was only "kernel32.dll".
>
>
>> Note that WINAPI is NOT NECESSARILY the same as __stdcall.
>> __stdcall is an implementation specification; WINAPI is an abstract
>> interface, which this
>> week, for the x86, happens to translate as __stdcall. If you want
>> __stdcall, you ask for
>> __stdcall. You should not be using a Microsoft-defined abstraction if the
>> intent is to
>> use __stdcall.
>
>OK, I understand your point and agree.
>
>> Note that I said the choice of "WINAPI" was bad. I did *not* say the
>> choice of __stdcall
>> was bad.
>
>Got it.
>
>
>> The choice of __stdcall was bad for a different reason: the names are not
>> easily used by
>> GetProcAddress, but that is not related to the use of the symbol WINAPI.
>>
>> Note that .DEF files have nothing to do with this. A .DEF file will
>> eliminate the need
>> for __declspec(dllexport), but at considerable inconvenience. But .DEF
>> files are for the
>> linker; they don't tell the compiler how to generate the calling sequence.
>
>I don't agree with this point.
>
>My point was: if you want to use __stdcall *and* don't want name decoration
>for global exported functions, to my knowledge, the only option is to use
>.DEF files.
****
..DEF files do it, also /EXPORTS, and see the #pragma cited earlier in the thread.

But note that .DEF files do not specify the calling sequence. They only specify the
naming convention if you use the renames option on the EXPORTS clause.
joe
****
>
>Giovanni
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm