Accessing COM Objects

John via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 13 12:11:59 PDT 2016


On Monday, 13 June 2016 at 17:38:41 UTC, Incognito wrote:
> Cool. Oleview gives me the idl files. How to convert the idl 
> files to d or possibly c?
>
> Would I just use them in place of IUnknown once I have the 
> interface?

In OleView you can save the IDL file, then run another tool, 
midl.exe, on the IDL file. That will generate the C headers. But 
you'd then have to translate that to D by hand.

I have written a tool that takes a COM type library and 
automatically converts it to a D source file. I could finish it 
off over the next few days and put the source on GitHub if you're 
interested.


More information about the Digitalmars-d-learn mailing list