M
MoshiachNow
HI,
Just beginning with threads...
Code:
$thr = threads->create({'context' => 'void'},\&THREAD,$computer);
sub THREAD {
$computer=shift;
print "COMPUTER=$computer\n";
$objWMIService =
Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or
&disp("WMI connection failed.\n",'RED');
$colItems = $objWMIService->ExecQuery("SELECT * FROM
Win32_Product", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);
}
$thr->join();
=============================================
result:
"Attempt to free non-existent shared string 'ExecQuery', Perl
interpreter: 0x235d27c at D:\
DOcuments\Ripro\AIX\myscripts\pod_check.pl line 988.
Free to wrong pool 218fd28 not 222770 at
D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl lin
e 988."
The thing is that 'ExecQuery' WAS working well till put in
thread...Appreciate ideas.
Thanks
Just beginning with threads...
Code:
$thr = threads->create({'context' => 'void'},\&THREAD,$computer);
sub THREAD {
$computer=shift;
print "COMPUTER=$computer\n";
$objWMIService =
Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or
&disp("WMI connection failed.\n",'RED');
$colItems = $objWMIService->ExecQuery("SELECT * FROM
Win32_Product", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);
}
$thr->join();
=============================================
result:
"Attempt to free non-existent shared string 'ExecQuery', Perl
interpreter: 0x235d27c at D:\
DOcuments\Ripro\AIX\myscripts\pod_check.pl line 988.
Free to wrong pool 218fd28 not 222770 at
D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl lin
e 988."
The thing is that 'ExecQuery' WAS working well till put in
thread...Appreciate ideas.
Thanks