Hi, Thanks for the reply. I am creating a new object to WIN32::OLE in the thread and I am consistently getting the following here:

Win32::OLE(0.1709) error 0x800401f0: "CoInitialize has not been called" at test.pl line 63 thread 1

use strict; use Win32::OLE; use Win32::OLE::Variant; use Win32::OLE qw(EVENTS); #reuired to capture the events use Thread qw(:DEFAULT async yield); Win32::OLE->Initialize(); my $RQCC; my $modemPort = 32; my $ret; my $deviceId; my $EventQueueTread = Thread->new(\&MonitorEventQueue); system "pause"; RQCCExtension::RQCCSreenMsg("INFO", "EXIT TEST CASE" ); sub MonitorEventQueue { Win32::OLE->Initialize(); my $Devicehandle = win32::OLE->new("rqccdriver.ExternalInterface.1" +) || die "CreateObject: $!"; if(!$Devicehandle) { print ("ERROR", "Could not create instance of RQCC" ); exit(1); } print "Should be Devicehandle = $Devicehandle\n"; my $Version = $Devicehandle->GetVersion(); print "Version = $Version\n"; }


In reply to Re^2: Passing win32::0LE object handle to another thread by himanshujain_60
in thread Passing win32::0LE object handle to another thread by himanshujain_60

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.