|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Amar (Amarjeet.singh
KLA-TENCOR.COM)Date: Wed Mar 06 2002 - 03:47:17 CST
Phil,
The problem is when i make a call to ::CoGetInterfaceAndReleaseStream, this
APi returns hr = success after this when my function tries to return thread
kept waiting there means it hangs.
Amar.
-----Original Message-----
From: Distributed COM-Based Code [mailto:DCOM
DISCUSS.MICROSOFT.COM]On
Behalf Of Phil Reynolds
Sent: Wednesday, March 06, 2002 2:58 PM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: Re: A thread in STA hangs
I presume you are calling WaitForSingleObject in your main STA, to wait for
the other threads to end.
If so, this is probably blocking your other threads from doing whatever they
need to do to tidy up (e.g. CoUnitialize etc).
All STA threads must pump messages for DCOM to work so use
MsgWaitForMultipleObjects or one of its relatives.
---------------------------------------------------------
Phil Reynolds
Ridgeway Systems and Software
Tel: +44 118 938 1211
Fax: +44 118 935 4444
mailto:preynolds
ridgewaysystems.com
http://www.ridgewaysystems.com
> -----Original Message-----
> From: Amar [mailto:Amarjeet.singh
KLA-TENCOR.COM]
> Sent: 06 March 2002 08:22
> To: DCOM
DISCUSS.MICROSOFT.COM
> Subject: [DCOM] A thread in STA hangs
>
>
> Hi All,
> I am creating a object in MainSTA and then I am creating thread and
> marshalling interface pointer by calling HRESULT hr =
> CoMarshalInterThreadInterfaceInStream(__uuidof(IRFT),pUnk,&pStream);
>
> and unmarshalling pointer by calling HRESULT hr =
> CoGetInterfaceAndReleaseStream((pTransfer->pStream),__uuidof(I
> RFT),(LPVOID
> *)&spRFT);
> in each of the threads.
>
> When the created thread tries to return, it hangs there and
> wait for single
> object never gets over.
> ???
> Thanks.
> Amar.
>
> ----------------------------------------------------------------
> Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
> contains important info. Save time, search the archives at
> http://discuss.microsoft.com/archives/index.html .
> To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
>
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]