use delegate with IUnknown

ore-sama spam at here.lot
Mon Oct 20 09:22:16 PDT 2008


Sergey Gromov Wrote:

> IUnknown is a built-in, deeply hacked interface which allows to write 
> proper COM objects in pure D.  You must import it from std.c.windows.com 
> module.  Obviously it applies some restrictions on methods which can be 
> defined there.  Your snipped starts to compile if you replace line 4 with
> 
>     extern (Windows) void foo() {}
>     t.add(&foo);

so this is a bug: compiler doesn't provide important info that calling conventions of argument and parameter are incompatible.



More information about the Digitalmars-d mailing list