Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create COM objects from Delphi objects?

Status
Not open for further replies.

apostolchopov

Programmer
Jun 8, 2004
53
BG
Hi, dear fellows?
Could you tell me how to create a COM object from a Delphi object. Could I do the following?

1\ Define the interface: IMyInterface and create the COM object. The COM object somehow inherits the TInterfacedObject and IMyInterface
2\ Then include the Delphi object TMyObject as a data member of the class implementing the interface. In the method AfterConstruction call the constructor of the inner TMyObject object and in the method BeforeDestruction call the destructor of the inner TMyObject object.

What do you think of this?

Have you got any better ideas?

Thank you in advance for your cooperation!

Regards!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top