Re: [Quickfix-developers] QuickFix.ConfigError
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-05-27 16:04:15
|
What concurrency model are you using? Try changing the following lines in MSXML_DOMDocument.cpp from this: if(FAILED(CoInitialize(NULL))) throw ConfigError("Could not initialize COM"); to this: HRESULT hresult = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED ); if( hresult != RPC_E_CHANGED_MODE && FAILED(hresult) ) throw ConfigError("Could not initialize COM"); My guess is that you are using MTA, and CoInitialize sets to STA, which is illegal. This change will attempt to use STA if COM hasn't been loaded, but will use whatever threading model you've set if it has. Let me know if this fixes your problem and I'll check it in. On May 27, 2004, at 10:23 AM, Ramprakash Umapathy wrote: > Hi, > > I have just started learning QuickFix in .NET > > I trying to use SocketAcceptor I get an error whenever I initialize > that. > > The Error is, > > An unhandled exception of type 'QuickFix.ConfigError' occurred in > WindowsApplication1.exe > > Additional information: Configuration failed: Could not initialize COM > > Unhandled Exception: QuickFix.ConfigError: Configuration failed: Could > not > initialize COM > at ReceiveFixEngineCS.Test.Main(String[] args) in c:\documents and > settings\umapar1a\my documents\visual studio > projects\cabutilities\testingprojects\windowsapplication1\class1.cs: > line > 37The program '[468] WindowsApplication1.exe' has exited with code 0 > (0x0). > > The code is here, > > > String fileName = "server.cfg"; > SessionSettings settings = new SessionSettings(fileName); > Application application = new Application(); > FileStoreFactory storefactory = new FileStoreFactory(settings); > ScreenLogFactory logFactory = new ScreenLogFactory( true, true, true > ); > > MessageFactory messageFactory = new DefaultMessageFactory(); > > SocketAcceptor acceptor > = new SocketAcceptor( application, storefactory, settings, > logFactory, messageFactory ); > > > > The configuration file is this, > > [DEFAULT] > ConnectionType=acceptor > SocketAcceptPort=5001 > FileStorePath=store > StartTime=00:00:00 > EndTime=00:00:00 > > [SESSION] > BeginString=FIX.4.2 > SenderCompID=s09183 > TargetCompID=umapar1a > DataDictionary=FIX42.xml > > Any help is appreciated, > > Ramprakash > > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |