I'm having a problem with AxWindow throwing an error
when it quits. I'm embedding the Microsoft Office
Document Imaging program into my app. When my program
exits, i get a dialog box that reads:
------
The instruction at "xxxxxx" referenced memory at
"xxxxxx". The memory could not be "read". Click OK
to terminate the program
------
Does anyone know how to track down why/where this
error is occurring?
The MODI control seems to be initialized properly and
working fine while the program is running. Please
note that I am calling $Control->Release() as
mentioned in the AxWindow docs.
Here is a stripped down version of my code. Please
note that MODI will only embed with Office 2003 or
later...
(using perl 5.8, ax 0.07, win xp)
use Win32::GUI;
use Win32::GUI::AxWindow;
use Win32::OLE;
use Win32::OLE::Const;
# main Window
$Window = new Win32::GUI::Window (
-title => "Win32::GUI::AxWindow test",
-pos => [100, 100],
-size => [400, 400],
-name => "Window",
) or die "new Window";
# Create AxWindow
$Control = new Win32::GUI::AxWindow (
-parent => $Window,
-name => "Control",
-pos => [10, 10],
-size => [300, 300],
-control => 'MiDocViewer.MiDocView',
) or die "new Control";
sub Window_Terminate {
$Control->Release();
return -1;
}
If anyone knows where I should look to resolve this, I
would be extremely grateful. Once I get this working,
I will submit some examples (and possibly a module)
showing how to play with MODI.
Thanks,
-Ariel