in reply to Re: Perl & Win32
in thread Exporting an Excel Chart to PNG using Win32::OLE

The "Perl problem" is, IMO, turning these obscure Win32::OLE error messages into something far more informative.

Replies are listed 'Best First'.
Re^3: Perl & Win32
by spurperl (Priest) on Mar 18, 2005 at 11:53 UTC
    It would be difficult since errors of this kind are tunneled directly from the OLE engine. It's OLE's cryptic messages that should be fixed - then Win32::OLE will be fine.

      Worse than that, judicious grepping of all of the Windows include files would suggest that this value is not even known to the OLE subsystem but comes from the Application, so without some gigantic registry of the possible HRESULT from every possible automation component you are always going to have this problem.


      I figure that there must be a way to ask the system, though OLE, what these cryptic error messages mean, something similar to the API call GetLastError() and the libwin32 functions Win32::GetLastError() and Win32::FormatMessage(). In that case, I think it's reasonable to ask Win32::OLE to handle the necessary paperwork for us.