in reply to WIN32::OLE bridging to MATHCAD
Error 0xc00000fd appears to mean stack overflow... something to do with threads...:) http://collab.mathsoft.com/~Mathcad2000/eval { my $answer1 = $S->getValue('output1'); 1; }; warn " ERROR : $@\n$^E" if $@;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: WIN32::OLE bridging to MATHCAD
by forgedascendant (Novice) on Apr 20, 2009 at 18:12 UTC | |
TO be honest I am not sure what a thread is or how it could be causing a problem. Dispite my ignorance I went to the documentation and found this:
Win32::OLE->Initialize(COINIT) Valid values for COINIT are:
Win32::OLE::COINIT_APARTMENTTHREADED - single threaded COINIT_OLEINITIALIZE is sometimes needed when an OLE object uses additional OLE compound document technologies not available from the normal COM subsystem (for example MAPI.Session seems to require it). Both COINIT_OLEINITIALIZE and COINIT_APARTMENTTHREADED create a hidden top level window and a message queue for the Perl process. This may create problems with other application, because Perl normally doesn't process its message queue. This means programs using synchronous communication between applications (such as DDE initiation), may hang until Perl makes another OLE method call/property access or terminates. This applies to InstallShield setups and many things started to shell associations. Please try to utilize the Win32::OLE->SpinMessageLoop and Win32::OLE->Uninitialize methods if you can not use the default COINIT_MULTITHREADED model. So I tried to clear the problem up with the following code: And I get the same error still. Did I fail to impliment this properly?
Thanks, | [reply] [d/l] |
by Anonymous Monk on Apr 21, 2009 at 09:57 UTC | |
Thats my guess. You need to examine $^E or Win32::OLE->LastError() for a better error message. | [reply] [d/l] |
by forgedascendant (Novice) on Apr 21, 2009 at 13:49 UTC | |
When I run the above script I get:
C:\>Perl "C:/documents and settings/aaron.verellen/desktop/trial2.pl" The information gleamed off the lasterror technique appears to be the same as the error message recieved before. My first though is I didn't impliment it correctly. Would you please take the time and correct my ignorance Anonymous Monk so that whatever clues you seek I can give you?
Thank you so much for everything you have done thus far, | [reply] [d/l] |