RE: WIN32::OLE WMI Out params

2009-12-03 Thread Brian Raven
Michael <> wrote: > Hi, > > I'm a novice regarding Perl, and need some help converting a VBScript > to a PerlScript. > > The following VBScript returns some data from HP OpenView. The > GetChildNodeGroups method returns the number of ChildGroups, > > and the [out] parameter NodeGroups returns

RE: WIN32::OLE WMI Out params

2009-12-03 Thread Michael
> Michael <> wrote: >> Hi, >> >> I'm a novice regarding Perl, and need some help converting a VBScript >> to a PerlScript. >> >> The following VBScript returns some data from HP OpenView. The >> GetChildNodeGroups method returns the number of ChildGroups, >> >> and the [out] paramete

RE: WIN32::OLE WMI Out params

2009-12-03 Thread Steven Manross
r 03, 2009 6:19 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: RE: WIN32::OLE WMI Out params > > > Michael <> wrote: > >> Hi, > >> > >> I'm a novice regarding Perl, and need some help converting a > >>

RE: WIN32::OLE WMI Out params

2009-12-03 Thread Michael
> When troubleshooting OLE issues, it is best to have the following code > after each OLE command... > > If (Win32::OLE-> LastError() != 0) { > print "error calling blah: " . Win32::OLE-> LastError() . "\n"; > exit 0; > } > > ...Or something similar, so you can see what OLE had issues with (

RE: WIN32::OLE WMI Out params

2009-12-04 Thread Steven Manross
t; Subject: RE: WIN32::OLE WMI Out params > > > When troubleshooting OLE issues, it is best to have the > following code > > after each OLE command... > > > > If (Win32::OLE-> LastError() != 0) { > > print "error calling blah: " . Win32::OLE->

RE: WIN32::OLE WMI Out params

2009-12-04 Thread Michael
inal Message- >> From: perl-win32-users-boun...@listserv.activestate.com >> [mailto:perl-win32-users-boun...@listserv.activestate.com] On >> Behalf Of Michael >> Sent: Thursday, December 03, 2009 6:45 AM >> To: perl-win32-users@listserv.ActiveState.com >>

Re: WIN32::OLE WMI Out params

2009-12-04 Thread Michael Ellery
-Original Message- >>> From: perl-win32-users-boun...@listserv.activestate.com >>> [mailto:perl-win32-users-boun...@listserv.activestate.com] On >>> Behalf Of Michael >>> Sent: Thursday, December 03, 2009 6:45 AM >>> To: perl-win32-us

RE: WIN32::OLE WMI Out params

2009-12-04 Thread Steven Manross
veState.com > Subject: Re: WIN32::OLE WMI Out params > > I haven't followed your thread closely, but it seems like the > relevant bits from your first link are these: > > my $objSecDescriptor = Win32::OLE::Variant-> new > (VT_DISPATCH|VT_BYREF); my $retval =

RE: WIN32::OLE WMI Out params

2009-12-04 Thread Michael
Okay - Just to sum up the whole thing. The original VBScript LastError() != 0) { print "Error calling GetObject: " . Win32::OLE->LastError() . "\n"; exit 0; } my $objOV_NodeGroup =

Re: WIN32::OLE WMI Out params

2009-12-04 Thread Michael Ellery
Michael wrote: > Okay - Just to sum up the whole thing. > > The original VBScript < > Option Explicit > > Dim objWMIService, objOV_NodeGroup, objGetRoot, objChildGroups, arrNodes, > objItem > > Set objWMIService = GetObject("winmgmts:root\HewlettPackard\OpenView\data") > > Set objOV_NodeGroup

Re: WIN32::OLE WMI Out params

2009-12-05 Thread Michael
On Fri, 04 Dec 2009 17:10:26 -0800, Michael Ellery wrote: > Michael wrote: >> Okay - Just to sum up the whole thing. >> >> The original VBScript <> >> Option Explicit >> >> Dim objWMIService, objOV_NodeGroup, objGetRoot, objChildGroups, arrNodes, >> objItem >> >> Set objWMIService = >> GetObje

Re: WIN32::OLE WMI Out params

2009-12-05 Thread Michael Ellery
Michael wrote: > On Fri, 04 Dec 2009 17:10:26 -0800, Michael Ellery > wrote: >> Michael wrote: >>> Okay - Just to sum up the whole thing. >>> >>> The original VBScript <>> >>> Option Explicit >>> >>> Dim objWMIService, objOV_NodeGroup, objGetRoot, objChildGroups, > arrNodes, >>> objItem >>> >>> Se

Re: WIN32::OLE WMI Out params

2009-12-05 Thread Michael
On Sat, 05 Dec 2009 05:58:48 -0800, Michael Ellery wrote: > Michael wrote: >> On Fri, 04 Dec 2009 17:10:26 -0800, Michael Ellery >> wrote: >>> Michael wrote: Okay - Just to sum up the whole thing. The original VBScript <>>> Option Explicit Dim objWMIService, objOV_No