Writing a library
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Fri Feb 16 11:39:10 PST 2007
Mn wrote:
> Is it possible to use the COM with D?
Yes. The last section of http://www.digitalmars.com/d/interface.html :
---
COM Interfaces
A variant on interfaces is the COM interface. A COM interface is
designed to map directly onto a Windows COM object. Any COM object can
be represented by a COM interface, and any D object with a COM interface
can be used by external COM clients.
A COM interface is defined as one that derives from the interface
std.c.windows.com.IUnknown. A COM interface differs from a regular D
interface in that:
* It derives from the interface std.c.windows.com.IUnknown.
* It cannot be the argument of a DeleteExpression.
* References cannot be upcast to the enclosing class object, nor
can they be downcast to a derived interface. To accomplish this, an
appropriate QueryInterface() would have to be implemented for that
interface in standard COM fashion.
---
More information about the Digitalmars-d
mailing list