Interestingly, this code does not produce the error:
use Win32::OLE;
my $view = Win32::OLE->new("MiDocViewer.MiDocView") or
die Win32::OLE::LastError();
It seems to be something relating to how AxWindow
releases the control. Unfortunately, I have no idea
how to debug that sort of thing. I did send an email
to Laurent and also to two people who are listed in
the Win32::OLE docs. If any of them reply to me with
a solution, I will forward it to the list.
-Ariel
--- Jez White <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the reply. I tried undefing the
> window,
> > ax-control and ole-control in various orders. All
> of
> > them still generated the error. I tried stepping
> > through the script to see which undef was causing
> the
> > error, but it seems to be caused by something
> under
> > the hood that happens after all of that.
>
> Humm. Not to sure what to suggest now.
>
> > This error occurs on both my home computer and my
> work
> > computer, which are basically the same
> configuration.
> >
> > FYI, this control will let you view/ocr/search
> .tif
> > and .mdi files. It just didn't do anything
> because
> > we're not asking it to. If you'd like to see it
> in
> > action, add this after the control is set up:
>
> > $v = $Control->GetOLE();
> > $v->{FileName} = 'test.TIF';
>
> OK - adding the lines above, caused the script to
> crash exactly as you
> describe:
>
> Call stack:
> 003E2683 OLE.dll:003E2683 CreatePerlObject
> 003E6172 OLE.dll:003E6172 SetSVFromVariant
> 0183B7A4
>
> So - this could be an Win32::OLE problem - it might
> be worth chasing it up
> with a list/group that work with Win32::OLE.
>
> It might also be worth dropping a mail to Laurent
> (the author of AxWindow)
> to see if he can point you in any direction.
>
> > there's a decent description of the object model
> here:
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mspauto/html/welcomemodi_hv01135783.asp
>
> Cheers,
>
> jez.
>
>