OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Tomasz Ostaszewski (era680015INTERIA.PL)
Date: Thu Jun 27 2002 - 02:57:38 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Does it really matter? No, the server is vanilla DLL and there's no
    surrogate. Client's main thread is STA, worker thread is MTA. The server
    is marked as "Free" threaded. The COM object from the server is created in
    the client's main thread, so it will be accessed through a proxy due to
    apartment model mismatch. The callback object is global.
    There goes my hipothesis:
    If the client will set up the connection (that is the client passes the
    server object a reference to some callback object) with the server object in
    his main thread (STA), then the server (or rather COM object exposed from
    the server) shall call back through a proxy. If the connection is set up
    from the client's worker thread, then the server will call back directly, as
    the worker thread's apartment is compatible with the object apartment. This
    is what my knowledge of COM tells me. Am I right with my presumptions ???

    ----- Original Message -----
    From: "Jonas Blunck TACMa" <jobuTAC.SE>
    To: <DCOMDISCUSS.MICROSOFT.COM>
    Sent: Thursday, June 27, 2002 9:40 AM
    Subject: Re: Threading model for callbacks

    > Will the client and the server run in different processes?
    >
    > // B
    >
    > -----Original Message-----
    > From: Tomasz Ostaszewski [mailto:era680015INTERIA.PL]
    > Sent: den 27 juni 2002 09:41
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: Re: Threading model for callbacks
    >
    >
    > Sorry, my post should sound like that:
    > > One of them is compatible with SERVER apartment while other is not.
    > instead of
    > > One of them is compatible with CLIENT apartment while other is not.
    >
    >
    > ----- Original Message -----
    > From: "Jonas Blunck TACMa" <jobuTAC.SE>
    > To: <DCOMDISCUSS.MICROSOFT.COM>
    > Sent: Thursday, June 27, 2002 9:05 AM
    > Subject: Re: Threading model for callbacks
    >
    >
    > > It sounds to me like you have the server and the client running in
    > different
    > > processes. In that case, you will always have a proxy/stub between the
    > > server and the client - no matter what threading model you may choose.
    > > Choose the threading model that is appropriate for the client.
    > >
    > > Best Regards,
    > > Jonas
    > >
    > >
    > >
    > > -----Original Message-----
    > > From: Tomasz Ostaszewski [mailto:era680015INTERIA.PL]
    > > Sent: den 27 juni 2002 09:01
    > > To: DCOMDISCUSS.MICROSOFT.COM
    > > Subject: Threading model for callbacks
    > >
    > >
    > > Hi,
    > > What is the threading model for callbacks? Suppose that my client
    > > has two threads. One of them is compatible with client apartment
    > > while other
    > is
    > > not. The client has also a callback object, that is global or stack.
    > > Now
    > i
    > > want server to call back on client using connection points. The way i
    > see
    > > it, if the initial connection points set up methods
    > (FindConnectionPoint(),
    > > Advise() and so on) are called from the thread incompatible with the
    > > apartment of the caller, the callback will be called through a proxy.
    > > If the connection points set up is done from the apartment compatible
    > > with
    > the
    > > server, a callback will be called through proxy. Am I right ???
    > >
    > >
    > >
    > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > > ~This is only a signature:
    > > ~"Wherefore I perceive that
    > > ~[there is] nothing better,
    > > ~than that a man should rejoice in his own
    > > ~works; for that [is] his portion:
    > > ~for who shall bring him to see
    > > ~what shall be after him? "
    > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > >
    > >
    > > ----------------------------------------------------------------
    > > 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
    > >
    > > ----------------------------------------------------------------------
    > > -
    > > INTERIA.PL: Portal pelen informacji... >>> http://link.interia.pl/f15f6
    > >
    > >
    > >
    >
    > ----------------------------------------------------------------
    > 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
    >
    > -----------------------------------------------------------------------
    > INTERIA.PL: Portal pelen informacji... >>> http://link.interia.pl/f15f6
    >
    >
    >

    ----------------------------------------------------------------
    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