Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-21 Thread Kagamin via Digitalmars-d-learn
On Sunday, 21 July 2019 at 07:04:00 UTC, rikki cattermole wrote: COM is used heavily in WinAPI since about Vista. Pretty much all new functionality has been exposed by it and NOT extern(Windows) functions which was the standard during up to about XP (for example notification icons would today b

Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-21 Thread rikki cattermole via Digitalmars-d-learn
On 21/07/2019 5:44 PM, Kagamin wrote: On Tuesday, 16 July 2019 at 01:38:49 UTC, evilrat wrote: Also from what I see MS done this intentionally, means they either no longer loves COM or there was some other good reason. Primary consumer of COM interfaces is Visual Basic. It was really only

Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-20 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 16 July 2019 at 01:38:49 UTC, evilrat wrote: Also from what I see MS done this intentionally, means they either no longer loves COM or there was some other good reason. Primary consumer of COM interfaces is Visual Basic. It was really only Bill Gates who loved Basic, he wrote a

Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-16 Thread KytoDragon via Digitalmars-d-learn
On Tuesday, 16 July 2019 at 01:38:49 UTC, evilrat wrote: As you can see it is by design. IUnknown has different vtbl[] comparing to regular D classes/interfaces. If it works with declaring your own empty IUnknown use it, also you can try extern(C++) which does similar thing to vtable, it might

Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-15 Thread evilrat via Digitalmars-d-learn
spec (https://dlang.org/spec/interface.html#com-interfaces) it seems that only interfaces inheriting from core.stdc.windows.com.IUnknown (or any interface named "IUnknown") get the COM interface layout instead of the D layout. What can I do to get the COM layout on interfaces that

Re: Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-15 Thread Nicholas Wilson via Digitalmars-d-learn
spec (https://dlang.org/spec/interface.html#com-interfaces) it seems that only interfaces inheriting from core.stdc.windows.com.IUnknown (or any interface named "IUnknown") get the COM interface layout instead of the D layout. What can I do to get the COM layout on interfaces that

Wrong vtable for COM interfaces that don't inherit IUnknown

2019-07-15 Thread KytoDragon via Digitalmars-d-learn
I am currently trying to write a XAudio2 backend and have come across the problem, that some of the interfaces for XAudio2's COM objects seem to be missing the first entry in their vtable. After reading the iterface article in the spec (https://dlang.org/spec/interface.html#com-interface

Re: How to COM interfaces work

2017-03-18 Thread evilrat via Digitalmars-d-learn
On Sunday, 19 March 2017 at 03:27:28 UTC, StarGrazer wrote: I'd just like to get some conformation on the process so at least I know I'm headed in the right direction. The project is pretty complex and most of the stuff is done in compile time code. What debug shows? If CoCreateInstance an

Re: How to COM interfaces work

2017-03-18 Thread StarGrazer via Digitalmars-d-learn
ions return COM interfaces(they inherit IDispatch interfaces in D). The interfaces are generated from idl2d. So they are just standard d interfaces that only mock up the COM interfaces. But it is probably not a D issue. IDispatch.Invoke returns a COM VARIANT type with the return type(which is an IDis

Re: How to COM interfaces work

2017-03-18 Thread StarGrazer via Digitalmars-d-learn
On Sunday, 19 March 2017 at 02:45:48 UTC, evilrat wrote: On Sunday, 19 March 2017 at 02:04:53 UTC, StarGrazer wrote: I have a COM interface that is dynamically created using invoke and such. One of the functions returns an interface. It is just a value of IUnknown or whatever. If I use it a

Re: How to COM interfaces work

2017-03-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 19 March 2017 at 02:04:53 UTC, StarGrazer wrote: If I use it as a pointer in to the the D interface equivalent, it crashes as the value is not pointing to anything valid. What's the code look like? What interface too?

Re: How to COM interfaces work

2017-03-18 Thread StarGrazer via Digitalmars-d-learn
On Sunday, 19 March 2017 at 02:45:48 UTC, evilrat wrote: On Sunday, 19 March 2017 at 02:04:53 UTC, StarGrazer wrote: I have a COM interface that is dynamically created using invoke and such. One of the functions returns an interface. It is just a value of IUnknown or whatever. If I use it a

Re: How to COM interfaces work

2017-03-18 Thread evilrat via Digitalmars-d-learn
On Sunday, 19 March 2017 at 02:04:53 UTC, StarGrazer wrote: I have a COM interface that is dynamically created using invoke and such. One of the functions returns an interface. It is just a value of IUnknown or whatever. If I use it as a pointer in to the the D interface equivalent, it cras

How to COM interfaces work

2017-03-18 Thread StarGrazer via Digitalmars-d-learn
I have a COM interface that is dynamically created using invoke and such. One of the functions returns an interface. It is just a value of IUnknown or whatever. If I use it as a pointer in to the the D interface equivalent, it crashes as the value is not pointing to anything valid. What do

Re: COM-Interfaces

2012-06-17 Thread Jesse Phillips
On Sunday, 17 June 2012 at 11:57:36 UTC, Denis Shelomovskij wrote: Here http://dlang.org/interface.html#COM-Interfaces we have a link to Lionello Lunesu's article http://lunesu.com/uploads/ModernCOMProgramminginD.pdf Is it correct that he hasn't managed to convince Microsoft to r

COM-Interfaces

2012-06-17 Thread Denis Shelomovskij
Here http://dlang.org/interface.html#COM-Interfaces we have a link to Lionello Lunesu's article http://lunesu.com/uploads/ModernCOMProgramminginD.pdf Is it correct that he hasn't managed to convince Microsoft to release his sources and one of us has to rewrite his library if we want