Re: [Quickfix-developers] .NET & COM threading models
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-04-15 14:12:39
|
My first guess would be that it is related to the build rather than=20 libxml2 itself. Libxml2 is used on a variety of unix systems without=20 trouble. The support for libxml2 on windows was actually put in at the=20= request of a client some time ago and isn't commonly used or tested,=20 although it uses the exact same code to interact with libxml2 as it=20 does under linux. Can you post a link to the distribution you are=20 using? Is it a native build or a cygwin build? I'm not so sure that a=20= cygwin build would work if you are using windows style paths. --oren On Apr 14, 2004, at 5:50 PM, John Debay wrote: > Oren, > > Thanks for the reply. I substituted in libxml2 in place of MSXML, but=20= > ran > into a problem when I tried to parse the FIX 4.2 message definition=20 > file. > Specifically, in this code: > > bool LIBXML_DOMDocument::load( const std::string& url ) > { QF_STACK_PUSH(LIBXML_DOMAttributes::lead) > try > { > m_pDoc =3D xmlParseFile(url.c_str()); > return m_pDoc !=3D NULL; > } > catch( ... ) { return false; } > > QF_STACK_POP > } > > xmlParseFile() throws. It seems to be crashing somewhere, but I=20 > downloaded > the libxml binaries, not the source code, so I am not seeing exactly=20= > where > it's having a problem. I tried reducing the XML file in case there was=20= > a > problem tag somewhere inside of it (even though MSXML parsed it = without > issue), but this did not help. > > This may be a question that is more germane to libxml than to=20 > QuickFix, but > I was hoping someone had come across this in the past. > > Thanks, > John > > -----Original Message----- > From: QuickFIX [mailto:or...@qu...] > Sent: Tuesday, April 13, 2004 5:52 PM > To: John Debay > Cc: qui...@li... > Subject: [Quickfix-developers] .NET & COM threading models > > John, > > If you are unable to resolve this with MSXML, QuickFIX also supports > libxml2, which is open source and also has a windows binary > distribution. See the installation instructions for how to tell > QuickFIX to build against libxml in place of MSXML3: > http://quickfix.sourceforge.net/quickfix/doc/html/ > 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 >> Remoting. >> I'm running into some incompatibilities between the COM threading=20 >> model >> Remoting sets up and QuickFix, which uses an STA model. Specifically, >> 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 >> the COM >> library on the current thread and identifies the concurrency model as >> single-thread apartment (STA)," to quote the documentation. Before >> this code >> is run, the .NET runtime has already set the current thread to run >> 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 >> 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 >> QuickFix? Is >> there a different XML library I can use besides MSXML? What does the >> *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 >> > > > ------------------------------------------------------- > 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=3D1470&alloc_id=3D3638&op=3Dcl= ick > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |