Re: COM/OLE advanced questions

2017-11-03 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 3 November 2017 at 12:24:43 UTC, Guillaume Piolat wrote: On Friday, 3 November 2017 at 10:50:27 UTC, Kagamin wrote: It only looks at the name. I'll test if that name needs to be "IUnknown" or the exact "core.sys.windows.unknwn.IUnknown", since I'm in @nogc and not necessarily

Re: COM/OLE advanced questions

2017-11-03 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 3 November 2017 at 12:20:43 UTC, Guillaume Piolat wrote: On Friday, 3 November 2017 at 02:30:59 UTC, evilrat wrote: My guess it will work fine when derive from any extern(Windows) interface(that's right, not class) that has base 3 methods(AddRef, Release, QueryInterface) I'll test

Re: COM/OLE advanced questions

2017-11-03 Thread Guillaume Piolat via Digitalmars-d-learn
Answering my own questions: On Thursday, 2 November 2017 at 14:22:56 UTC, Guillaume Piolat wrote: Question 1. Is it mandatory to inherit from core.sys.windows.unknwn.IUnknown, or just having an interface named "IUnknown" validate it for being a COM interface? Deriving from an interface

Re: COM/OLE advanced questions

2017-11-03 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 3 November 2017 at 10:50:27 UTC, Kagamin wrote: It only looks at the name. I'll test if that name needs to be "IUnknown" or the exact "core.sys.windows.unknwn.IUnknown", since I'm in @nogc and not necessarily on Windows, so I can't inherit from core.sys.windows.unknwn.IUnknown

Re: COM/OLE advanced questions

2017-11-03 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 3 November 2017 at 02:30:59 UTC, evilrat wrote: You can't(or maybe you can but that is not a true COM). COM is Windows tech. It is backed up by OLE or whatever server it is. What happens is that I translate a SDK which provides "COM-like" objects, on Windows and Mac (claiming ABI

Re: COM/OLE advanced questions

2017-11-03 Thread Kagamin via Digitalmars-d-learn
On Thursday, 2 November 2017 at 14:22:56 UTC, Guillaume Piolat wrote: Question 1. Is it mandatory to inherit from core.sys.windows.unknwn.IUnknown, or just having an interface named "IUnknown" validate it for being a COM interface? If yes, then how am I supposed to use COM interfaces in

Re: COM/OLE advanced questions

2017-11-02 Thread evilrat via Digitalmars-d-learn
You'd better read some more authorative source since my experience is very limited on that matter, but here is some quick notes On Thursday, 2 November 2017 at 14:22:56 UTC, Guillaume Piolat wrote: Question 1. Is it mandatory to inherit from core.sys.windows.unknwn.IUnknown, or just having

Re: COM/OLE advanced questions

2017-11-02 Thread Daniel Kozak via Digitalmars-d-learn
AFAIK you can only use COM from windows anyway. OK I have been using them from linux but only with WINE help. On Thu, Nov 2, 2017 at 3:22 PM, Guillaume Piolat via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I wonder if anyone has used COM in dlang extensively. > > Context:

COM/OLE advanced questions

2017-11-02 Thread Guillaume Piolat via Digitalmars-d-learn
I wonder if anyone has used COM in dlang extensively. Context: I must use COM FFI interfacing on systems that aren't necessarily Windows. It is essential that the layout of interfaces and classes are the same than in equivalent C++ objects. Question 1. Is it mandatory to inherit from