directx bindings problem
evilrat
evilrat666 at gmail.com
Tue Oct 29 20:18:45 PDT 2013
On Tuesday, 29 October 2013 at 19:40:40 UTC, Benjamin Thaut wrote:
> So I found it. Its actually your fault.
>
> IXAudio2Voice isn't a COM interface. That means it should _not_
> inherit from IUnkown. But if it isn't a COM interface it can't
> be a regular D interface either, because if it is a regular
> D-Interface it will not have a v-table layout that conforms
> with C++. That means you have to put "extern(C++)" in front of
> IXAudio2Voice to make it work.
>
> So to make stuff work you should change
>
> interface IXAudio2Voice : IUnknown
>
> to
>
> extern(C++) interface IXAudio2Voice
>
> Then everything works fine.
omg! i can't believe this :(
i have tried this too
first(http://www.dsource.org/projects/bindings/wiki/DirectX), and
it was somewhat crappy, so i start my own tranlation, all was
fine until xaudio2. i looked up what author of those bindings
did, noticed that it doesn't exactly relates to xaudio2.h, and
tried to make the same in my version. so it figures out i have
just overlooked that its not a COM interfaces. big thanks to you,
i feel stupid :(
now i need to fix my xaudio, and then i can clean d3d11 mess i
made.
More information about the Digitalmars-d-learn
mailing list