C++ interface vs D and com
Adam Sansier via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 13 14:27:29 PDT 2016
On Wednesday, 13 July 2016 at 20:47:21 UTC, John wrote:
> On Wednesday, 13 July 2016 at 20:28:40 UTC, Adam Sansier wrote:
>> On Wednesday, 13 July 2016 at 19:22:44 UTC, Kagamin wrote:
>>> On Wednesday, 13 July 2016 at 16:48:53 UTC, Adam Sansier
>>> wrote:
>>>> There's a lot of misinformation on the net.
>>>
>>> Nope, it's just you. COM support in D and in general works
>>> fine for everyone else.
>>
>> For anyone else having similar problems please ignore. COM
>> doesn't work perfectly regardless of what some nobody says and
>> I'm not the only one having problems. There are others and a
>> search shows this.
>>
>> http://forum.dlang.org/thread/iovu2e$2d3d$1@digitalmars.com
>>
>> I notice you are the last one to say "COM uses stdcall
>> convention. Everything else is not COM." Spreading your lies
>> and disinformation. People like you are a source of problems,
>> not a solution. Please learn that you don't know everything
>> and your generalization about how everything works is simply
>> wrong.
>>
>> http://www.digitalmars.com/d/archives/digitalmars/D/learn/thiscall_calling_convention_4943.html
>>
>> Regardless of why the problems exist, or if they are subtle or
>> only in certain scenarios, they exist and some imbecile
>> claiming they don't just makes more trouble for those trying
>> to solve their problems.
>>
>> If you don't like my attitude, stop acting like the world is
>> perfect and when someone has a problem that it just might be
>> legitimate. If you don't actually feel like helping, simply
>> don't reply, it's that easy.
>
> The problem is that ASIO deviates from the standard way of
> implementing COM. Other languages like Delphi expect COM to use
> stdcall too, so the problem is not unique to D. Putting
> "extern(C++):" before the interface method declarations should
> allow it to work...
>
> interface IASIO : IUnknown {
> extern(C++):
> HRESULT SomeMethod();
> }
NO! If you do that then it's not COM! Put extern(Windows)! It's
the only way it can work!
Yes! your right, If you were only around to tell me that in the
first place! ;) Now we know. Again, as I said before, the problem
is informational. Maybe because come works 99% of the time
doesn't help us in the 1% if some think 99%=100%(that new math
shit that's causing so many problems). I've created a big enough
stink about it that anyone in the future having similar issues
might be able to resolve them much quicker.
Thanks.
More information about the Digitalmars-d-learn
mailing list