svad has asked for the wisdom of the Perl Monks concerning the following question:

Hello, people!
I read documentation on Win32::COM and understood how to create ole-object. I succesfully created object for MS-Word, AdobeAcrobat and so on using their symbolic PROGID.

But for some other interfaces, which have very similar PROGID, it fails with a message "Interface is not supported"

Do I understand correctly that Win32::OLE is able to create only those COM object who support IDispatch interface?

Does anyone have an experience on how to automate other COM objects as well, probably using lower level functions and Win32::API module?

Thank you in advance,
Vadim.

Replies are listed 'Best First'.
Re: How to automate COM objects (Win32)
by guha (Priest) on Apr 24, 2002 at 19:53 UTC

    From the docs of ActiveState Perl v631 Win32::OLE module.

    This module provides an interface to OLE Automation from Perl. OLE Automation brings VisualBasic like scripting capabilities and offers powerful extensibility and the ability to control many Win32 applications from Perl scripts.

    The Win32::OLE module uses the IDispatch interface exclusively. It is not possible to access a custom OLE interface. OLE events and OCX's are currently not supported.

    Actually, that's no longer strictly true. This module now contains ALPHA level support for OLE events. This is largely untested and the specific interface might still change in the future.

    HTH

      Thank you, this really helps me.
      for some strange reason I missed IDispatch word at the very beginning of documentation...

      OTOH I think "It is not possible to access a custom OLE interface" means that not possible with Win32::OLE, but may be, in any particular case, it is still possible via lower level API and Win32::API module?

      Warmest wishes,
      Vadim