Importing version identifiers from another file?

2022-04-11 Thread KytoDragon via Digitalmars-d-learn
I am currently maintaining a port of a c++ library that uses conditional compilation to integrate into the users program. e.g.: config.h (edited by the user of the library) ``` #define USE_MY_ASSERT void MY_ASSERT(bool expr) {...} ``` library.c ``` include "config.h" #ifndef USE_MY_ASSERT v

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

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-interfaces) it s