RE: [Quickfix-developers] Problem with VB.NET
Brought to you by:
orenmnero
From: Ramprakash U. <ram...@ca...> - 2004-06-04 08:12:52
|
Hi Oren, =20 The FIX works fine and thanks. =20 I looking for the code snippets to do the following, =20 1. How to check for a particular session user is already logged on or = the connection is alive? ( I see a method isLoggedOn in Acceptor and = Initiator classes but not sure how to use in my VB code) =20 2. How to handle a situation in case of application breakdown (with some code sample?!) ?=20 =20 3. How can I pass the parameters for SessionSettings from own customized application (not by using configuration files (*.cfg or whatsoever)? =20 TIA, Ramprakash =20 =20 P.S : The sender is a newbie (to both QuickFix and :NET Technologies) = and prefers to have code samples in VB.NET / C# =20 =20 -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of or...@qu... Sent: luned=EC 31 maggio 2004 19:53 To: Ramprakash Umapathy Cc: qui...@li...; sa...@uc... Subject: RE: [Quickfix-developers] Problem with VB.NET Ok, I've fixed this and was able to run your sample application with no problem. It appears that VB.NET got confused about const pointers that = were declared in MC++. I've attached a new quickfix/src/.NET/Application.h = file. If you replace the one you have with this one you should be all set. = I'll check this into CVS and it will be in the next release as well. Sam, I CC'd you on this because while researching this I noticed you = posted the same problem earlier to the mailing list. Don't know if it is still = of interest to you but here is the fix. =20 --oren -------- Original Message -------- Subject: [Quickfix-developers] Problem with VB.NET From: "Ramprakash Umapathy" <ram...@ca...> Date: Mon, May 24, 2004 5:43 am To: qui...@li... Hi All, I'm a newbie trying to use QuickFix in VB.NET I ran into problems with my code here. Could anyone of help me to solve. = I have seen a similar post with no answers. I use like this in my VB.NET = code, Imports QuickFix Public Class QFapp Inherits QuickFix.MessageCracker Implements QuickFix.Application Public Sub toApp(ByVal msg As QuickFix.Message, ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.toApp End Sub Public Sub fromAdmin(ByVal msg As QuickFix.Message, ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.fromAdmin End Sub Public Sub onCreate(ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.onCreate End Sub Public Sub onLogon(ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.onLogon End Sub Public Sub onLogout(ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.onLogout End Sub Public Sub toAdmin(ByVal msg As QuickFix.Message, ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.toAdmin End Sub Public Sub fromApp(ByVal msg As QuickFix.Message, ByVal sid As QuickFix.SessionID) Implements QuickFix.Application.fromApp End Sub End Class And then I call like this, Imports QuickFix Module Module1 Sub Main() Try 'Get Setting from ini file Dim ss As New SessionSettings("c:\client.ini") Dim sInit As SocketInitiator Dim sapp As New QFapp Dim storeFactory As New FileStoreFactory(ss) Dim logFactory As New FileLogFactory("c:\test.log") Dim msgFactory As New DefaultMessageFactory 'Initiator Section sInit =3D New SocketInitiator(sapp, storeFactory, ss, = msgFactory) 'sInit =3D New SocketAcceptor(sapp, storeFactory, ss, = logFactory, msgFactory) sInit.start() sInit.stop() Catch ex As System.Exception Trace.WriteLine(ex.Message) Trace.WriteLine(ex.StackTrace) End Try End Sub End Module The System throws an Error (doesn't even caught in Catch Block) with the following message, An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module. Additional information: Signature of the body and declaration in a = method implementation do not match. Type: TestFixEngine.QFapp. Assembly: TestFixEngine, Version=3D1.0.1605.20104, Culture=3Dneutral, = PublicKeyToken=3Dnull. TIA, Holy P.S: I could be helpful in anyone of you point out the QuickFix VB.NET Resources ------------------------------------------------------- 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_id149&alloc_id=8166&op=3Dclick _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers=20 |