RE: UInt32 cast as SInt32

2008-05-23 Thread Jan Dubois
This is really just missing functionality in the Win32::OLE module. Some older Microsoft documentation claimed that only VT_UI1 was valid inside a VARIANTARG, but not VT_UI2, VT_UI4 etc. Same thing for VT_INT and VT_UINT. Therefore Win32::OLE doesn't support them. I've checked the current doc

RE: UInt32 cast as SInt32

2008-05-23 Thread Leblanc, Larry
Works like a charm! Thanks, I'll be sure to read up on these 2 functions shortly. :) Larry -Original Message- From: Mark Dootson [mailto:[EMAIL PROTECTED] Sent: May 23, 2008 7:53 AM To: Leblanc, Larry Cc: perl-win32-users@listserv.ActiveState.com Subject: Re: UInt32 cast as SInt3

Re: UInt32 cast as SInt32

2008-05-23 Thread Mark Dootson
Hi, I think pack / unpack are your friend as in example below. Regards Mark use Win32; use Win32::OLE qw (in); my $shares = Win32::OLE->GetObject('WinMgmts://.')->ExecQuery('select * from Win32_Share'); foreach my $share (in $shares ) { print 'Name: ' . $share->Name . "\n"; print 'Pa

RE: UInt32 cast as SInt32

2008-05-23 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leblanc, Larry Sent: 23 May 2008 00:35 To: perl-win32-users@listserv.ActiveState.com Subject: UInt32 cast as SInt32 > G'day, > > When attempting to retrieve an unsigned, integer (UInt32) value from winmgmts:\\.\root\cimv2\Win32_Share.