Hi Steven,

Well I tried your suggestion and I think that the Win32::OLE::Variant
module might be the solution, as I have found some other examples where WMI
[out] and variants are used.

http://www.infoqu.com/dev/perl-programming/using-perl-with-wmi-to-set-folder-level-permissions-16930-1/
http://www.perlmonks.org/?node_id=325823

However I'm in way over my head here, so unless someone could cut it out in
pieces , I don't think that 
I'll get any further.

/Michael


On Fri, 4 Dec 2009 02:12:03 -0700, "Steven Manross" <ste...@manross.net>
wrote:
> Below...
> 
>> -----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-users@listserv.ActiveState.com
>> 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-> LastError() . "\n";
>> >   exit 0;
>> > }
>> > 
>> > ...Or something similar, so you can see what OLE had issues 
>> with (if 
>> > anything).  It might lead you in a direction that fixes it.
>> > 
>> > Steven
>> 
>> Added to the script, but no issues reported.
>> 
>> /Michael
> 
> Well, then my next guess is the use of the Variant module (because no
> error is thrown from OLE).
> 
> Some OLE calls require to be cast of a certain type before they work.
> 
> use Win32::OLE::Variant;
> 
> my $nodes = Variant(VT_ARRAY|VT_VARIANT, 0); 
> 
> #I might also try VT_VARIANT or VT_ARRAY|VT_BSTR instead of
> VT_ARRAY|VT_VARIANT
> 
> #then
> my $objChildGroups = $objGetRoot->GetChildNodeGroups($nodes, TRUE); 
> 
> Play around with this...  I'm not the greatest Variant script writer
> here, to know exactly which combination will work (if this is it) based
> on the object type as I've only run into this a few times before, but
> you can get examples from your perl install here (depending on your perl
> build version) of similar options to try and all the VT_* types:
> 
> C:\Perl\html\lib\Win32\OLE\Variant.html
> 
> HTH
> 
> P.S. I googled OV_NodeGroup and found someone else with your same
> problem on an HP board (or so it seems).  :(
> 
> Steven
> 
>> _______________________________________________
>> Perl-Win32-Users mailing list
>> Perl-Win32-Users@listserv.ActiveState.com
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to