OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: problem with synchronized call via SendMessage

From: Peter Partch (peterpartchPMCONSULT.COM)
Date: Tue Jul 15 2003 - 12:31:11 CDT


Most of the responses have suggested using COM for the inter-thread calls
(using COM interfaces and bringing up the proxy/stubs if required either by
using CoMarshalInterface or the GIT).

Problem is this, if the proxy is brought up in a STA, then you will be right
back at the same problem (of getting RPC_E_CANTCALLOUT_ININPUTSYNCCALL)
because the calling thread as been marked as input_sync.

input_sync constraints state that you cannot yield to a message pump while
servicing the call.

Peter Partch

----- Original Message -----
From: "Schumann, Stephan" <Stephan.SchumannCA.COM>
To: <DCOMDISCUSS.MICROSOFT.COM>
Sent: Monday, July 14, 2003 11:54 AM
Subject: [DCOM] problem with synchronized call via SendMessage

Hi all,

i have a MFC application with some subthreads that should send window
message with ::SendMessage in order to retrieve data from a COM-Server
(which is single threaded apartment). But I cannot do that since I
always get an error called RPC_E_CANTCALLOUT_ININPUTSYNCCALL. MSDN says
I should to switch to PostMessage, but I cannot do since I need the
return value of SendMessage and I need the call synchronized.
Any Ideas how to fix, avoid or workaround that problem?

Thanks in advance,
Regards Stephan

----------------------------------------------------------------
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-requestDISCUSS.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-requestDISCUSS.MICROSOFT.COM