SQL 2005 and SQL Express VS2005 July CTP Merge Replication

Tech-Archive recommends: Fix windows errors by optimizing your registry



When I execute
(MergePullSubscription)mPullSub.SynchronizationAgent.Synchronize() I get an
error {"The MergeSynchronizationAgent class must be instantiated on a
Single-Threaded Apartment (STA) thread."}, but as far as I can tell it is. I
even added the attribure [STAThread] and still get the error.

Thanks Mike Smith
.



Relevant Pages

  • Re: a com instance can be shared in diffrent threads?
    ... Then each thread is in its own single-threaded apartment, ... then COM guarantees that any call to it will be executed on the same STA ... the interface pointer to the worker thread, but any call from the worker ... thread will switch right back to the main thread, execute there, and any ...
    (microsoft.public.win32.programmer.ole)
  • Re: STA cannot prevent multiple client calls accessing at the same time??
    ... I know why my program is crashing, it is mainly because Bis executed in the middle of A. ... What I don't understand is why Bis executed in the middle of Csince the class is a STA. ... > While everything you say is true, I'm not convinced this is the reason for ... >> one method cannot execute in the middle of another. ...
    (microsoft.public.vc.atl)
  • Re: STA cannot prevent multiple client calls accessing at the same time??
    ... The method serialization is a myth. ... methods are handled on a single thread, ... one method cannot execute in the middle of another. ... anticipated by virtually all STA components. ...
    (microsoft.public.vc.atl)
  • RE: Does GetInterfaceFromGlobal(..) makes AddRef?
    ... The call did not execute." ... STA object, terminates and a proxy to an interface of the STA object is still ... we need to Releaseon the unmarshalled interface. ...
    (microsoft.public.win32.programmer.ole)
  • Re: WCF service: how to always execute in same thread
    ... WCF threads run in the MTA, "Single Threaded" COM components need an STA ... sure that only 1 call at a time can execute. ... second instance is running. ...
    (microsoft.public.dotnet.languages.csharp)