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
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 'Path:
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 SInt32
Hi
Of
Leblanc, Larry
Sent: May 22, 2008 4:35 PM
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.Type (i.e. WMI), Perl is
returning incorrect values (ex
G'day,
When attempting to retrieve an unsigned, integer (UInt32) value from
winmgmts:\\.\root\cimv2\Win32_Share.Type (i.e. WMI), Perl is returning
incorrect values (ex.: -2147483648 when I should be getting 2147483648
or -2147483645 instead of 2147483651).
This obviously has to do with