Thread: [Quickfix-developers] Problem with VB.NET
Brought to you by:
orenmnero
From: Ramprakash U. <ram...@ca...> - 2004-05-24 13:07:29
|
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 |
From: Ramprakash U. <ram...@ca...> - 2004-05-24 12:44:02
|
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 |