www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Interfaces

reply Heinz <billgates microsoft.com> writes:
Hi, i was reading the interfaces chapter in
http://www.digitalmars.com/d/interface.html and it says "Interfaces correspond
to the interface exposed by operating system objects, like COM/OLE/ActiveX for
Win32".
Does this mean i can't use interfaces on unix operating systems?

An interface can have a constructor and destructor?

Thanks in advance.
Jan 20 2007
parent Carlos Santander <csantander619 gmail.com> writes:
Heinz escribió:
 Hi, i was reading the interfaces chapter in
 http://www.digitalmars.com/d/interface.html and it says "Interfaces
 correspond to the interface exposed by operating system objects, like
 COM/OLE/ActiveX for Win32". Does this mean i can't use interfaces on unix
 operating systems?
 
I was going to say that it's just poorly written, but IIRC that behavior changed many versions ago. I can't find that change, but check the bottom of that page: it says that COM interfaces are those derived from std.c.windows.com.IUnknown. So, go ahead and use them as you would in Java. -- Carlos Santander Bernal
Jan 20 2007