Board index » delphi » Create/Destroy not getting called when COM object used from ASP

Create/Destroy not getting called when COM object used from ASP

Hello!

I've created a COM object (Active Server Object + ActiveX Type Library)
in Delphi that I'm using with ASP.

When creating and free'ing the object from ASP the constructor and
destructor are not called which means I've been forced to create my own
functions for purposes of initializing values etc.

I find this rather annoying knowing, so could anyone explain to me why
that is?

In ASP I create the object with Server.CreateObject if that helps.

Thanks any response.

 

Re:Create/Destroy not getting called when COM object used from ASP


Im Artikel <MPG.17911ef2a006c6d3989...@news.tiscali.dk>, Michael Knudsen
<m...@DONTknudsenSEND.dk> schreibt:

Quote
>When creating and free'ing the object from ASP the constructor and
>destructor are not called which means I've been forced to create my own
>functions for purposes of initializing values etc.

I'm not sure about ASP, but the constructor and destructor are Delphi specifc,
not related to ASP or OLE. I vaguely remember that one must implement a
"factory", which creates OLE objects on demand, and that factory is responsible
for creating the Delphi objects, which then are returned as interfaces.

BTW, there exist better newsgroups for OLE related questions.

DoDi

Other Threads