Home All Groups Group Topic Archive Search About

Failed to load control...Your version of ocx may be outdated..

Author
27 May 2005 5:00 PM
Paul fpvt2
We have a VB 6 application that calls an ActiveX exe (this ActiveX exe
has a timer with time interval = 1, so that it right away exits out of the
ActiveX
exe and let the main application be free to do other things). The ActiveX
exe threading model is "Thread per object". The reason for
the ActiveX exe is to mimick a multi threading process, so that the main
application can do multiple processes without having to wait for 1 process 
to finish. Inside the ActiveX exe we do the compression using an ActiveX
control.

When we just call 1 to 2 of the ActiveX exe, everything works fine,
but when we call 3 or more of the Activex Exe at the same time to compress
the file, we get
the following error:

err = 372 ; error = Failed to load control 'ECLaxX' from ECLActiveX.ocx.
Your version of ECLActiveX.ocx may be outdated.
Make sure you are using the version of the control that was provided
with your application.

Is this because the Activex control that we use to compress the file is not
multi threaded ?
How can I fix this problem ?
Somebody told me to protect my compression section with a semaphore, what
does it mean and can I do it in VB 6 ?

Thank you very much.

Author
28 May 2005 12:03 PM
J French
On Fri, 27 May 2005 10:00:17 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
<Paulfp***@discussions.microsoft.com> wrote:

Show quoteHide quote
>We have a VB 6 application that calls an ActiveX exe (this ActiveX exe
>has a timer with time interval = 1, so that it right away exits out of the
>ActiveX
>exe and let the main application be free to do other things). The ActiveX
>exe threading model is "Thread per object". The reason for
>the ActiveX exe is to mimick a multi threading process, so that the main
>application can do multiple processes without having to wait for 1 process 
>to finish. Inside the ActiveX exe we do the compression using an ActiveX
>control.
>
>When we just call 1 to 2 of the ActiveX exe, everything works fine,
>but when we call 3 or more of the Activex Exe at the same time to compress
>the file, we get
>the following error:
>
>err = 372 ; error = Failed to load control 'ECLaxX' from ECLActiveX.ocx.
>Your version of ECLActiveX.ocx may be outdated.
>Make sure you are using the version of the control that was provided
>with your application.
>
>Is this because the Activex control that we use to compress the file is not
>multi threaded ?
>How can I fix this problem ?
>Somebody told me to protect my compression section with a semaphore, what
>does it mean and can I do it in VB 6 ?

That sounds very peculiar
Try launching a number of normal EXEs at the same time, and see what
happens.

My suspicion is that ECLActiveX.ocx is checking for the number of
instances of itself - and artificially (deliberately) screwing you up.

IMO semaphores are a red herring.
Think of semaphores as 'Walk/Don't walk' lights that you can set and
obey or disobey at will.

One further point, it is often better to queue processor intensive
jobs - threads are a bit of an illusion, one only has one CPU
( or two if one has bought into the bulls**t )
Author
31 May 2005 11:17 PM
Paul fpvt2
Thank you for your reply.
> Try launching a number of normal EXEs at the same time, and see what
> happens.
When I put the ECLActiveX.ocx inside a normal EXE, and launch 7 copies of
the EXE, I did not get the error.
What does it mean ?
I can not use a normal EXE, because to eah EXE I need to pass an object,
which is a class object. If there is a way to pass an object through an EXE,
I would use a normal EXE, is there a way to do this ?

> One further point, it is often better to queue processor intensive
> jobs - threads are a bit of an illusion, one only has one CPU
> ( or two if one has bought into the bulls**t )
Unfortunately, I can not do this, because every user will then have to wait
for another user to finish before the next job can be processed.

Thank you very much.



Show quoteHide quote
"J French" wrote:

> On Fri, 27 May 2005 10:00:17 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
> <Paulfp***@discussions.microsoft.com> wrote:
>
> >We have a VB 6 application that calls an ActiveX exe (this ActiveX exe
> >has a timer with time interval = 1, so that it right away exits out of the
> >ActiveX
> >exe and let the main application be free to do other things). The ActiveX
> >exe threading model is "Thread per object". The reason for
> >the ActiveX exe is to mimick a multi threading process, so that the main
> >application can do multiple processes without having to wait for 1 process 
> >to finish. Inside the ActiveX exe we do the compression using an ActiveX
> >control.
> >
> >When we just call 1 to 2 of the ActiveX exe, everything works fine,
> >but when we call 3 or more of the Activex Exe at the same time to compress
> >the file, we get
> >the following error:
> >
> >err = 372 ; error = Failed to load control 'ECLaxX' from ECLActiveX.ocx.
> >Your version of ECLActiveX.ocx may be outdated.
> >Make sure you are using the version of the control that was provided
> >with your application.
> >
> >Is this because the Activex control that we use to compress the file is not
> >multi threaded ?
> >How can I fix this problem ?
> >Somebody told me to protect my compression section with a semaphore, what
> >does it mean and can I do it in VB 6 ?
>
> That sounds very peculiar
> Try launching a number of normal EXEs at the same time, and see what
> happens.
>
> My suspicion is that ECLActiveX.ocx is checking for the number of
> instances of itself - and artificially (deliberately) screwing you up.
>
> IMO semaphores are a red herring.
> Think of semaphores as 'Walk/Don't walk' lights that you can set and
> obey or disobey at will.
>
> One further point, it is often better to queue processor intensive
> jobs - threads are a bit of an illusion, one only has one CPU
> ( or two if one has bought into the bulls**t )
>
>
>
Author
1 Jun 2005 10:24 AM
J French
On Tue, 31 May 2005 16:17:52 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
<Paulfp***@discussions.microsoft.com> wrote:

Show quoteHide quote
>Thank you for your reply.
>> Try launching a number of normal EXEs at the same time, and see what
>> happens.

>When I put the ECLActiveX.ocx inside a normal EXE, and launch 7 copies of
>the EXE, I did not get the error.
>What does it mean ?
>I can not use a normal EXE, because to eah EXE I need to pass an object,
>which is a class object. If there is a way to pass an object through an EXE,
>I would use a normal EXE, is there a way to do this ?

>> One further point, it is often better to queue processor intensive
>> jobs - threads are a bit of an illusion, one only has one CPU
>> ( or two if one has bought into the bulls**t )

>Unfortunately, I can not do this, because every user will then have to wait
>for another user to finish before the next job can be processed.

Fine, so we know that you can have 7 copies of that OCX running at the
same time in 7 EXEs

Does your AX EXE notify the caller when it is finished ?
- or is it just 'here is a job - go process it'

How complex is the Object that is being passed over ?
Could it be written to a file - or is it rather 'interactive'

What type of creation/usage property have you given the exposed Class
in the AX EXE (Instancing)
Have you tried setting it to 3 Single Use

My suspicion is that the OCX has the equivalent of a .BAS module
behind it, and that is being shared by the different
instances/invocations of the AX EXE

If your AX EXE does not call back to momma when done (or maybe even if
it does) you could set up a queue of objects to be processed inside
the AX EXE.

Multiple threading is not all that it is cracked up to be, it is great
for tasks that are just waiting, but for things that are using the CPU
intensively it is just wasting time jumping between tasks.

I think that your problem is caused by a shared Data segment buried
inside the OCX - setting the instancing to Single Use should fix that.
Author
1 Jun 2005 5:05 PM
Paul fpvt2
Thank you very much for your reply.
> Does your AX EXE notify the caller when it is finished ?
> - or is it just 'here is a job - go process it'
It is just 'here is a job - go process it'. How can ActiveX exe notifies the
caller when it is finished?

> How complex is the Object that is being passed over ?
> Could it be written to a file - or is it rather 'interactive'
The object is a class object for the Winsock control (which has client
connection, etc.), so unfortunately I can not write it to a file.

> What type of creation/usage property have you given the exposed Class
> in the AX EXE (Instancing)
> Have you tried setting it to 3 Single Use
The AX exe instance was 5-MultiUse.
I changed it to 3-Single Use per your advice, and so far it seemed to work
fine.
If I don't get any more error until tomorrow, I will know for sure it works.
I will keep you posted.

Thanks a lot for your help.

Show quoteHide quote
"J French" wrote:

> On Tue, 31 May 2005 16:17:52 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
> <Paulfp***@discussions.microsoft.com> wrote:
>
> >Thank you for your reply.
> >> Try launching a number of normal EXEs at the same time, and see what
> >> happens.
>
> >When I put the ECLActiveX.ocx inside a normal EXE, and launch 7 copies of
> >the EXE, I did not get the error.
> >What does it mean ?
> >I can not use a normal EXE, because to eah EXE I need to pass an object,
> >which is a class object. If there is a way to pass an object through an EXE,
> >I would use a normal EXE, is there a way to do this ?
>
> >> One further point, it is often better to queue processor intensive
> >> jobs - threads are a bit of an illusion, one only has one CPU
> >> ( or two if one has bought into the bulls**t )
>
> >Unfortunately, I can not do this, because every user will then have to wait
> >for another user to finish before the next job can be processed.
>
> Fine, so we know that you can have 7 copies of that OCX running at the
> same time in 7 EXEs
>
> Does your AX EXE notify the caller when it is finished ?
> - or is it just 'here is a job - go process it'
>
> How complex is the Object that is being passed over ?
> Could it be written to a file - or is it rather 'interactive'
>
> What type of creation/usage property have you given the exposed Class
> in the AX EXE (Instancing)
> Have you tried setting it to 3 Single Use
>
> My suspicion is that the OCX has the equivalent of a .BAS module
> behind it, and that is being shared by the different
> instances/invocations of the AX EXE
>
> If your AX EXE does not call back to momma when done (or maybe even if
> it does) you could set up a queue of objects to be processed inside
> the AX EXE.
>
> Multiple threading is not all that it is cracked up to be, it is great
> for tasks that are just waiting, but for things that are using the CPU
> intensively it is just wasting time jumping between tasks.
>
> I think that your problem is caused by a shared Data segment buried
> inside the OCX - setting the instancing to Single Use should fix that.
>
>
>
Author
2 Jun 2005 8:23 AM
J French
On Wed, 1 Jun 2005 10:05:20 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
<Paulfp***@discussions.microsoft.com> wrote:

>Thank you very much for your reply.
>> Does your AX EXE notify the caller when it is finished ?
>> - or is it just 'here is a job - go process it'
>It is just 'here is a job - go process it'. How can ActiveX exe notifies the
>caller when it is finished?

Easy, you pass a reference to a Class or a Form in the calling EXE
- down to the AX EXE where it 'remembers' it

Then the AX EXE can call the main EXE using a 'known' Public function
in the Class or Form
- note: you'll most likely need to send the Clas or Form as an Object

>> How complex is the Object that is being passed over ?
>> Could it be written to a file - or is it rather 'interactive'
>The object is a class object for the Winsock control (which has client
>connection, etc.), so unfortunately I can not write it to a file.

Gottit

>> What type of creation/usage property have you given the exposed Class
>> in the AX EXE (Instancing)
>> Have you tried setting it to 3 Single Use
>The AX exe instance was 5-MultiUse.
>I changed it to 3-Single Use per your advice, and so far it seemed to work
>fine.
>If I don't get any more error until tomorrow, I will know for sure it works.
>I will keep you posted.

I think that will have fixed it
5 MultiUse allows the variables in .BAS modules to be shared by all
the EXEs using the AX EXE

3 Single Use does not permit this 'sharing', and my bet is that
something in the OCX was 'sharing' stuff in a concealed .BAS module.

>Thanks a lot for your help.

You are welcome - I hope that your problem is solved
Author
3 Jun 2005 5:01 PM
Paul fpvt2
Hi,
I just want to let you know that the problem is fixed. Thank you very much
for your help, I couldn't have figured it out without your help.

You said that "5 MultiUse allows the variables in .BAS modules to be shared
by all
the EXEs using the AX EXE". What did you mean by this ? Did you mean that
the ECLActiveX control uses variables in a .BAS modules, and it allows my
main EXE to share these variables ? I am still not clear about it.

Thanks once more.

Show quoteHide quote
"J French" wrote:

> On Wed, 1 Jun 2005 10:05:20 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
> <Paulfp***@discussions.microsoft.com> wrote:
>
> >Thank you very much for your reply.
> >> Does your AX EXE notify the caller when it is finished ?
> >> - or is it just 'here is a job - go process it'
> >It is just 'here is a job - go process it'. How can ActiveX exe notifies the
> >caller when it is finished?
>
> Easy, you pass a reference to a Class or a Form in the calling EXE
> - down to the AX EXE where it 'remembers' it
>
> Then the AX EXE can call the main EXE using a 'known' Public function
> in the Class or Form
> - note: you'll most likely need to send the Clas or Form as an Object
>
> >> How complex is the Object that is being passed over ?
> >> Could it be written to a file - or is it rather 'interactive'
> >The object is a class object for the Winsock control (which has client
> >connection, etc.), so unfortunately I can not write it to a file.
>
> Gottit

> >> What type of creation/usage property have you given the exposed Class
> >> in the AX EXE (Instancing)
> >> Have you tried setting it to 3 Single Use
> >The AX exe instance was 5-MultiUse.
> >I changed it to 3-Single Use per your advice, and so far it seemed to work
> >fine.
> >If I don't get any more error until tomorrow, I will know for sure it works.
> >I will keep you posted.
>
> I think that will have fixed it
> 5 MultiUse allows the variables in .BAS modules to be shared by all
> the EXEs using the AX EXE
>
> 3 Single Use does not permit this 'sharing', and my bet is that
> something in the OCX was 'sharing' stuff in a concealed .BAS module.
>
> >Thanks a lot for your help.
>
> You are welcome - I hope that your problem is solved
>
Author
6 Jun 2005 9:24 AM
J French
On Fri, 3 Jun 2005 10:01:02 -0700, "=?Utf-8?B?UGF1bCBmcHZ0Mg==?="
<Paulfp***@discussions.microsoft.com> wrote:

>Hi,
>I just want to let you know that the problem is fixed. Thank you very much
>for your help, I couldn't have figured it out without your help.

That is the point of these NGs <g>

>You said that "5 MultiUse allows the variables in .BAS modules to be shared
>by all
>the EXEs using the AX EXE". What did you mean by this ? Did you mean that
>the ECLActiveX control uses variables in a .BAS modules, and it allows my
>main EXE to share these variables ? I am still not clear about it.

Good to hear it is fixed.

With a 5 MultiUse AX EXE data in all .BAS modules is shared for /all/
instances of the AX EXE
- even if they are instantated by a totally different App

This is /very/ useful for communicating between Applications, or for
writing a 'Server' that can be used by multiple Apps

My hunch was that the offending OCX has a .BAS module buried inside
it, probably for subclassing.

3 Single Use ensures that all .BAS module data is /not/ shared
In other words each instance of the AX EXE is totally stand alone

There is another problem that comes up with OCXes, which you need to
be aware of - if they have a .BAS module buried inside them, then
different instances of the OCX in the same Application can interfere
with each other.

This normally happens when the writer of the OCX is rather sloppy.

Back to AX EXEs
- they are rather interesting animals, and it is well worth spending a
little research time on checking them out.

IMO the documentation is not very clear.

However most packages like IE, Excel, Word etc that support
'automation' are really AX EXEs
- an interesting thing to know ....