Mailing List Archive

OLE Automation question
I have been unable to get the new Perl 100 build to get a string from
an OLE automation server. Given the following VB code:

dim myobj as object
set myobj = CreateObject('myserver.session')
debug.print myobj.name

I'm trying the following perl code:

use OLE;
$myobj = CreateObject OLE 'myserver.session' or
warn "Can't create new instance of myserver.";
print $myobj->name, "\n";
print $myobj->{name}, "\n";

All I get are two newlines. I've looked at my server and at Perl in
the debugger, and the method is getting through my server correctly,
and it is retrieved from the return variant correctly in ntole.cpp,
but I'm too unfamiliar with Perl's internals to follow what happens
after that.

As an aside, I'm also unable to get the excel example from the
beginning of the OLE Automation doc to work with the Excel in Office
95. Perl says "Can't call method "Open" without a package or object
reference at exceltst.pl line 5." The type library for Office 95
still has a workbooks method for excel, so I'm puzzled here too.

FWIW, I'm running NT 3.51, VC++2.2, and (still) progman. I'm also
running MKS ksh, but this fails in a cmd window in the same way.

Thanks in advance for any information.

--
Caleb T. Deupree
Cincom Systems, Inc. ;; not an official representative of Cincom Systems
cdeupree@cincom.com