I've written a fairly simple script that creates a few COM object
handles and invokes methods on them (in my case related to managing
Virtual Server). This looks something like:
my $handle = $WScript->CreateObject("Foo.Application");
my $resultingObject = $handle->method();
Now, a call to "method" will sometimes result in a error and no
object will be returned. In that case I can check if $resultingObject
is undefined, but I've not been able to find any documentation about
how to get to the error (which seems to end up in some global/
contextual object). So the questions I have are:
* Can I get to this error using Win32::OLE->LastError(). Will that
mix well with my perlscript use or should I just rewrite the whole
thing using Win32::OLE calls?
* Is the source for the perl <-> WSH glue code available somewhere? I
downloaded the activatstate perl source dist and couldn't find it there.
* Is there a better way to do this in perlscript? Is there another
global variable I can just access? (similar to Err in VBScript).
/Sam
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs