Re: [Quickfix-developers] QuickFix.ConfigError
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-05-28 17:11:12
|
Can't say for sure about the VB.NET. When I originally put together =20 the .NET API, I naively thought that if it works in one .NET language, =20= it works in all of them. Boy was I wrong. Some people have been using =20= QuickFIX with VB.NET, and we have been fixing the problems as they are =20= reported. It definitely works with some of the releases, but we don't =20= ourselves do any testing under VB.NET. So any changes to the .NET =20 library overtime can break VB.NET compatibility. I'm actually not even =20= sure if I have VB.NET installed anywhere right now, but I'll try to =20 take a look at this and see what can be done. --oren On May 28, 2004, at 5:13 AM, Ramprakash Umapathy wrote: > Hi Miler, > > You're right. I tried to use MTA in my code and after setting STA in = my > class it works fine now. > > I have added [ STAThread ] in C# code on my class. It works fine now. > Basically I'm VB Guy finding lot of difficulties to code in C#. There =20= > seems > to be a problem in using VB.NET code in QuickFix.NET. Any idea why it =20= > does > n't work? Please refer to my earlier post regarding this > http://sourceforge.net/mailarchive/forum.php?=20 > thread_id=3D4789984&forum_id=3D103 > > > Thanks a lot. > Ram > > > -----Original Message----- > From: Oren Miller [mailto:or...@qu...] > Sent: gioved=EC 27 maggio 2004 18:04 > To: Ramprakash Umapathy > Cc: qui...@li... > Subject: Re: [Quickfix-developers] QuickFix.ConfigError > > > 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 =3D CoInitializeEx( NULL, COINIT_APARTMENTTHREADED ); = if( > hresult !=3D 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, >> >> =09 >> String fileName =3D "server.cfg"; >> SessionSettings settings =3D new SessionSettings(fileName); >> Application application =3D new Application(); >> FileStoreFactory storefactory =3D new = FileStoreFactory(settings); >> ScreenLogFactory logFactory =3D new ScreenLogFactory( true, = true, true > >> ); >> =09 >> MessageFactory messageFactory =3D new DefaultMessageFactory(); >> >> SocketAcceptor acceptor >> =3D new SocketAcceptor( application, storefactory, = settings, >> logFactory, messageFactory ); >> >> >> >> The configuration file is this, >> >> [DEFAULT] >> ConnectionType=3Dacceptor >> SocketAcceptPort=3D5001 >> FileStorePath=3Dstore >> StartTime=3D00:00:00 >> EndTime=3D00:00:00 >> >> [SESSION] >> BeginString=3DFIX.4.2 >> SenderCompID=3Ds09183 >> TargetCompID=3Dumapar1a >> DataDictionary=3DFIX42.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=3D3149&alloc_id=3D8166&op=3Dclick >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle =20= > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=9966&op=3Dclick > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |