[DUG] ocx import problem

Jolyon Smith jsmith at deltics.co.nz
Thu Jul 3 11:33:17 NZST 2014


As far as Windows itself is concerned there is no problem with
instantiating a visual ActiveX - or any other window - in whatever thread
you like.  Well, there are complexities which you might call "problems",
but they can be addressed with sufficient scaffolding in place.

The biggest problem in normal Delphi applications is that part of that
scaffolding - the message pump - only operates in the main thread.  If you
create windows in background threads then you have to provide your own
message loop for each of those threads to ensure that messages for/from
those windows are correctly processed.

And if those windows involve interactions with windows in other threads
then you will almost certainly have sychronization issues to deal with.

What you absolutely cannot do however is hand off creating a window/Active
control to a background thread and then hope to reclaim that window/control
on the main thread once the tedious business of creation and initialization
is complete.  A window has affinity with its creator thread.  End of.

Creating windows on background threads is generally a level of complexity
that is best dealt with by employing the Barge Pole pattern.

As in:  Don't go anywhere near it!!!  :)



On 3 July 2014 11:00, Robert Martin <rob at chreos.co.nz> wrote:

>  Yup, strange.  I understand the drawings can require a lot of Ram but I
> would have thought that would be allocated when the drawing is loaded !
>
> I also note their docs say the default is 256MB but you might want to
> expand it to 512MB.  Yet the default is actually 512.   The load time is
> remarkably slow also.  11 -12 seconds just to create the component with you
> then need to initialise (1.5 s) before you can use it.
>
> The user is very concerned they will have to wait 12s before viewing an
> image for the first time.  They would rather the our app load 12s slower
> (i.e. create the ActiveX on startup).
>
> Would it be fair to say you can't create the visual ActiveX in a thread?
> Wondering if anyone has any suggestions ?
>
> Cheers
> Rob
>
>
>
>  On 3/07/2014 10:51 a.m., Jolyon Smith wrote:
>
> That's bizarre.  What on earth do they need 512MB of contiguous address
> space for ?  In fact, since the solution is to reduce the allocation to
> 256MB, they clearly *don't* need it, so why ask for it in the first place
> ?  O.o
>
> It makes you wonder whether they even really need 256MB either.
>
> The mind boggles.
>
>
> On 3 July 2014 10:21, Robert Martin <rob at chreos.co.nz> wrote:
>
>>  Hi Guys
>>
>> Just thought I would post the results of this for anyone else wanting it
>> in the future.  Here is the fix from Oracle.  Interestingly it is all OS
>> not just Windows XP as suggested in the Oracle doc, I amusing Windows 7.
>>
>>
>>
>>   [image: https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> *Getting Error "External exception E06D736" when Creating an AutoVue
>> ActiveX Instance (Doc ID 1668623.1)*
>>
>> [image: To Bottom]To Bottom
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635>
>>
>> [image: https://support.oracle.com/epmos/adf/images/t.gif]
>>    ------------------------------
>>
>> Modified:03-May-2014[image:
>> https://support.oracle.com/epmos/adf/images/t.gif]Type:PROBLEM[image:
>> https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> [image: Rate this document]
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635>
>>
>> [image: https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> [image: Email link to this document]
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635>[image:
>> https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> [image: Open document in new window]
>> <https://support.oracle.com/epmos/faces/DocContentDisplay?id=1668623.1>[image:
>> https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> [image: Printable Page]
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635>[image:
>> https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> [image: https://support.oracle.com/epmos/adf/images/t.gif]
>>
>> *In this Document*
>>
>>  Symptoms
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635#SYMPTOM>
>>
>>
>>
>>  Cause
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635#CAUSE>
>>
>>
>>
>>  Solution
>> <https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=sy3syqrxm_9&_afrLoop=259965495499635#FIX>
>>    ------------------------------
>>  Applies to:
>>
>> Oracle AutoVue Electro-Mechanical Professional - Version 20.2.2 and later
>> Oracle AutoVue 3D Professional Advanced - Version 20.2.2 and later
>> Oracle AutoVue EDA Professional - Version 20.2.2 and later
>> Oracle AutoVue Office - Version 20.2.2 and later
>> Oracle AutoVue 2D Professional - Version 20.2.2 and later
>> Information in this document applies to any platform.
>>  Symptoms
>>
>> When using the AutoVue Desktop Deployment ActiveX on Windows XP and
>> trying to create a new instance of AutoVue the following error occurs:
>>
>> *"External exception E06D736"*
>>
>> *Steps to reproduce:*
>>
>>    1. Using an IDE build an AutoVue ActiveX project.
>>    2. Try to compile and run the project on Windows XP.
>>    3. Notice the error.
>>
>>  Cause
>>
>> The problem is due an issue with Windows XP when allocating 512MB of
>> contiguous memory.
>>  Solution
>>
>> *Solution steps:*
>>
>>    1. Open your *autovue.properties* file (located in "<AutoVue install
>>    folder>\bin").
>>    2. Locate the line which start with "autovue.cmdline".
>>    3. Change "-Xmx512m" to "-Xmx256m".
>>    4. Save the change and test again.
>>
>>
>>
>>
>> Cheers
>> Rob
>>
>>  On 24/06/2014 2:20 p.m., Robert Martin wrote:
>>
>> Hi
>>
>> The vendor is a little company called 'Oracle' !
>>
>> The software was provided by our client and I have tried to register with
>> Oracle for support but at this stage can't get their web site to work.
>> They keep sending email confirmation emails but when I click the 'verify'
>> link it fails.  I guess thats the peril of dealing with small back yard
>> companies.  That said their web site is a million times better than SAPs,
>> their web site and support leaves a considerable amount to be desired and I
>> was just trying to purchase a product !
>>
>> I have found a Oracle list that I have posted to but no response as yet.
>> Waiting for my post to be checked.
>>
>> It's nice to see that people still reply to the Delphi list :)
>>
>> Cheers
>> Rob
>>
>>  On 24/06/2014 2:11 p.m., Jeremy Coulter wrote:
>>
>> that was my next suggest, to run Delphi in admin mode:-)   Yeah it seems
>> really weird. Is the vendor no longer around or able to help?
>>
>>  Jeremy
>>
>>
>>  On Tue, Jun 24, 2014 at 2:09 PM, Robert Martin <rob at chreos.co.nz> wrote:
>>
>>>  Hi Jeremy
>>>
>>> The application I get the error in is Delphi (when I drop the component
>>> on the form)!  I have tried running Delphi as Admin and no go.  This is
>>> making me very sad !
>>>
>>> Thanks
>>> Rob
>>>
>>>
>>>
>>>  On 24/06/2014 2:02 p.m., Jeremy Coulter wrote:
>>>
>>> What happens if your run your app. in admin mode ?  wondering if its
>>> permissions........
>>>
>>>  Jeremy
>>>
>>>
>>> On Tue, Jun 24, 2014 at 1:38 PM, Robert Martin <rob at chreos.co.nz> wrote:
>>>
>>>>  Hi Jolyon
>>>>
>>>> Good suggestion :)  I assumed it was installed as the main product /
>>>> standalone app runs fine.   I downloaded and installed the latest Java
>>>> runtime but alas still no go.
>>>>
>>>> I have also tried registering the ocx with regsvr32 and that also
>>>> fails.  I have un installed and re install autovue but still no go.  Not
>>>> sure if it is Delphi or AutoVue
>>>>
>>>> Thanks
>>>> Rob
>>>>
>>>>
>>>>  On 24/06/2014 12:34 p.m., Jolyon Smith wrote:
>>>>
>>>>  Do you have the required Java Runtime Environment installed and
>>>> configured ?
>>>>
>>>> I believe the AutoVue ActiveX control is merely a wrapper around the
>>>> underlying Java based AutoVue implementation, so without the necessary Java
>>>> scaffolding the ActiveX isn't going to stand up.
>>>>
>>>>
>>>>
>>>> On 24 June 2014 11:54, Robert Martin <rob at chreos.co.nz> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I have an activeX control for AutoVue (CAD software) I am trying to
>>>>> import into Delphi XE2.  I can import the activeX and install it into a
>>>>> package however when I try to place the control on a form I get
>>>>> and 'External exception'.  Subsequent attempts to add it generate
>>>>> 'ClassFactory cannot supply requested class'.  I have done a search on
>>>>> that message and most results indicate an issue with installing an
>>>>> activeX or a bit versioning issue.  I believe the version installed is
>>>>> 32Bit.
>>>>>
>>>>> How can I test the JvueAX.ocx file is installed correctly, is there an
>>>>> easy way to do this?
>>>>>
>>>>> Does anyone have any suggestions on how to resolve the issue?  We
>>>>> desperately need to get this working !!!
>>>>>
>>>>> The version of AutoVue we are using is 20.2.2 (I believe the most
>>>>> recent).  I installed it using the ISDK and DesktopDeployment
>>>>> installers.
>>>>>
>>>>> I can post the component wrapper if that would help.
>>>>>
>>>>> Thanks
>>>>> Rob
>>>>>
>>>>> _______________________________________________
>>>>> NZ Borland Developers Group - Delphi mailing list
>>>>> Post: delphi at listserver.123.net.nz
>>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz
>>>>> with Subject: unsubscribe
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> NZ Borland Developers Group - Delphi mailing list
>>>> Post: delphi at listserver.123.net.nz
>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>>>>
>>>>
>>>>
>>>>  No virus found in this message.
>>>> Checked by AVG - www.avg.com
>>>> Version: 2014.0.4592 / Virus Database: 3972/7731 - Release Date:
>>>> 06/23/14
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> NZ Borland Developers Group - Delphi mailing list
>>>> Post: delphi at listserver.123.net.nz
>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz
>>>> with Subject: unsubscribe
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> NZ Borland Developers Group - Delphi mailing list
>>> Post: delphi at listserver.123.net.nz
>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>>>
>>>
>>>
>>> No virus found in this message.
>>> Checked by AVG - www.avg.com
>>> Version: 2014.0.4592 / Virus Database: 3972/7731 - Release Date: 06/23/14
>>>
>>>
>>>
>>> _______________________________________________
>>> NZ Borland Developers Group - Delphi mailing list
>>> Post: delphi at listserver.123.net.nz
>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
>>> Subject: unsubscribe
>>>
>>
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at listserver.123.net.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>>
>>
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2014.0.4592 / Virus Database: 3972/7731 - Release Date: 06/23/14
>>
>>
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at listserver.123.net.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>>
>>
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2014.0.4592 / Virus Database: 3972/7731 - Release Date: 06/23/14
>>
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at listserver.123.net.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
>> Subject: unsubscribe
>>
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
>
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4592 / Virus Database: 3986/7785 - Release Date: 07/02/14
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 168 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0007.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 4400 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0008.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 610 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0009.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 168 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0010.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 538 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0011.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 653 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0012.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 168 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0013.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 935 bytes
Desc: not available
Url : http://listserver.123.net.nz/pipermail/delphi/attachments/20140703/88a2884a/attachment-0001.gif 


More information about the Delphi mailing list