How to create singletone AutomationObjecty in Delphi5?

Hello.

I have a question...
How can I create singletone Automation object in Delphi5 ?

Currently I'm using the following way:
I derived new factory class from TAutoObjectFactory, like the:

TSingleToneAutoObjectFactory = class(TAutoObjectFactory)
private
FObject: TComObject;
public
function CreateComObject(const Controller: IUnknown): TComObject; override;
end;

But the problem is that sometimes it creates two instances of object instead of one. :-(
Could you please share some of your experience?

With regards,
Dmitry.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories