On 03/09/2016 10:35 AM, KlausO wrote:

>          IUnknown pUnk;
>
>          //
>          // Does not compile:
>          //
>          //  Error: function
> core.sys.windows.unknwn.IUnknown.QueryInterface(const(GUID)* riid,
> void** pvObject) is not callable using argument types (const(GUID), void**)
>          //
>          hr = storage.QueryInterface(IID_IUnknown, cast(void**)&pUnk);

Without any experience with COM or (current) Windows programming, just by looking at that error message, the following may work:

    IID unknown = IID_IUnknown;
    // (Apparently, IID is an alias for const(GUID).)

    storage.QueryInterface(&unknown, /* ... */);

Ali

Reply via email to