[Quickfix-developers] .NET & COM threading models
Brought to you by:
orenmnero
From: QuickFIX <or...@qu...> - 2004-04-13 22:51:58
|
John, If you are unable to resolve this with MSXML, QuickFIX also supports =20 libxml2, which is open source and also has a windows binary =20 distribution. See the installation instructions for how to tell =20 QuickFIX to build against libxml in place of MSXML3: =20 http://quickfix.sourceforge.net/quickfix/doc/html/=20 install.html#Windows%20(C++) --oren On Apr 13, 2004, at 4:36 PM, John Debay wrote: > Hi, > > I'm trying to use QuickFix 1.7.0 within a server hosted on .NET =20 > Remoting. > I'm running into some incompatibilities between the COM threading = model > Remoting sets up and QuickFix, which uses an STA model. Specifically, =20= > within > the function MSXML_DOMDocument::MSXML_DOMDocument(), the line: > > if(FAILED(CoInitialize(NULL))) > throw ConfigError("Could not initialize COM"); > > throws an exception. The reason is that CoInitialize() "initializes =20= > the COM > library on the current thread and identifies the concurrency model as > single-thread apartment (STA)," to quote the documentation. Before =20 > this code > is run, the .NET runtime has already set the current thread to run =20 > within an > MTA model. > > I believe I have a fix in place by replacing CoInitialize with > CoInitializeEx and setting dwCoInit to COINIT_MULTITHREADED, but won't = =20 > be > sure until I have an opportunity to thoroughly test tomorrow. In the > meantime I was hoping for a little guidance. > > Has anyone had any experience mixing COM threading models with =20 > QuickFix? Is > there a different XML library I can use besides MSXML? What does the =20= > *nix > implementation use? > > Thanks in advance. > > John > > ----------------------------------------------------------- > This email message is intended only for the addressee(s) > and contains information that may be confidential and/or > copyright. If you are not the intended recipient please > notify the sender by reply email and immediately delete > this email. Use, disclosure or reproduction of this email > by anyone other than the intended recipient(s) is strictly > prohibited. No representation is made that this email or > any attachments are free of viruses. Virus scanning is > recommended and is the responsibility of the recipient. > > Thank you. > ----------------------------------------------------------- > > For more information on CTC, LLC please visit > our website at: > > http://www.chicagotrading.com. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |