thiscall calling convention
Max Samuha
maxter at i.com.ua
Tue Oct 24 07:00:30 PDT 2006
Thank you
>HOWEVER... *** IUnknown is treated specially by DMD ***
>It is magical, and it makes all of the member functions use the MSVC
>'thiscall' calling convention. (There's no other way to specify 'thiscall').
>It should just work. Have you actually tried it?
Yes, I tried it. Doesn't work. I'm not sure, but apparently the COM
interface member functions in D use stdcall by default, not thiscall.
At least, IUnknown members are correctly declared in com.d as using
stdcall. IMO, the docs should be clearer on that issue.
btw, MSVC++ 2005 allows to set __thiscall explicitly.
>Hi!
>
>Maybe you could try to google for "iasiothiscallresolver.h".
>
>I used this in a C++ project (before I converted to D and trashed the
>code) to do all the ASIO stuff. I had used MinGW and couldn't link to the
>ASIO interface either (does only work from Visual C++), using this header
>file it worked. Maybe you can rewrite it and use it, don't know if it
>works in D, though.
>
>-Mike
Yes, i saw this header. Thanks.
More information about the Digitalmars-d-learn
mailing list