Init not present in the generated APL from ActiveX component

forum.gupta.bugreport (2005-2010)
pernik
Czech Republic
Posts: 83
Joined: 28 May 2019, 10:50
Location: Brno, Czech Republic

Init not present in the generated APL from ActiveX component

Post by pernik » 20 Jul 2005, 15:46

 Posted by:  Jan Pernica 

Init() function is not generated for ActiveX component so that it cannot
be instantiated. We have to call CreateObject("Product.object") to
instantiate it. The evaluation version has worked fine.

CTD 4.0 PTF 1

Jan Pernica

Pedro Vazquez

Re: Init not present in the generated APL from ActiveX component

Post by Pedro Vazquez » 20 Jul 2005, 16:42

 Posted by:  Pedro Vazquez 

Jan,
The init() function does not longer exists... Now you have to replace it
with Create() and you have to make sure that when you finish using that
object, call the Release() function.

Hope it helps

Pedro E. Vazquez
Buenos Aires Software S.A. -- www.bas.com.ar
Argentina

pernik
Czech Republic
Posts: 83
Joined: 28 May 2019, 10:50
Location: Brno, Czech Republic

Re: Init not present in the generated APL from ActiveX component

Post by pernik » 20 Jul 2005, 20:05

 Posted by:  Jan Pernica 

The Create funciton calls the __CoClassCreateObject() But it does not
instantiate the ActiveX object. The only CreateObject function creates
and initializes the ActiveX component.

So that there is no "easy to use" function generated.

Regards

Jan

Pedro Vazquez

Re: Init not present in the generated APL from ActiveX component

Post by Pedro Vazquez » 20 Jul 2005, 20:26

 Posted by:  Pedro Vazquez 

Jan,
I've migrated a huge application from CTD 1.5.1 to TD 2005, a lot of
Active X components included. And the only thing that I had to do, is to
erase the component and declare it again, in order to refresh the
references, change the Init() function with Create() function and add the
Release() at the end of the object ussage. That's all...
Have a look at the .pdf attached (Chapter 8) , maybe it helps...

Regards

Pedro E. Vazquez
Buenos Aires Software S.A. -- www.bas.com.ar
Argentina

You do not have the required permissions to view the files attached to this post.

pernik
Czech Republic
Posts: 83
Joined: 28 May 2019, 10:50
Location: Brno, Czech Republic

Re: Init not present in the generated APL from ActiveX component

Post by pernik » 21 Jul 2005, 22:57

 Posted by:  Jan Pernica 

Thank you Pedro

Reading that document was very useful. The problem was solved by
redeclaring ActiveX variables. Remove and write it again as written in
the documentation. After that I can use app.Create().

Thank you

Jan

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests