Re: [Quickfix-developers] .Net WinApp Crashes
Brought to you by:
orenmnero
From: Shane T. <str...@co...> - 2008-01-29 15:53:56
|
John, Seems like your initiator object should be a form-level object so that it won't be destroyed/collected when Form1_Load ends. > > Hi Everyone, > > I am building a Windows Application using .Net Visual Studio 2008. My > Application keeps crashing. I am able to log on to my test session, but > after the first message the application simply crashes. Oddly enough, my > console application works wonderfully and does not have any problems. Has > anyone else encountered this issue in .NET Windows Application using > QF? Is > it where I place the main entry for QF that matters? For example in > Program > as opposed to below: > > private void Form1_Load(object sender, EventArgs e) > { > > > SessionSettings settings = new > > SessionSettings("C:\\GlobalLinkConfig\\configs\\Initiator\\Initiator.config"); > Application application = new Application(); > FileStoreFactory storeFactory = new > FileStoreFactory(settings); > //ScreenLogFactory logFactory = new ScreenLogFactory(true, > true, > false); > MessageFactory messageFactory = new DefaultMessageFactory(); > ThreadedSocketInitiator initiator = new > ThreadedSocketInitiator(application, storeFactory, settings, > messageFactory); > > initiator.start(); > > } > > |