RE: [Quickfix-developers] VB.NET Sample Code
Brought to you by:
orenmnero
From: <Sa...@uc...> - 2004-01-05 19:47:51
|
> -----Original Message----- > From: Miller, Oren [mailto:OM...@ri...] > Sent: Wednesday, December 31, 2003 3:50 PM > To: sa...@uc...; qui...@li... > Subject: Re: [Quickfix-developers] VB.NET Sample Code > > > It would probably be helpful if you can post your application > class or project. > > -------------------------- > Sent from my BlackBerry Wireless Handheld > > Of course!.... .. here is the class that I hoped would act just like it's C# counterpart in the "executor" sample code. '======================= Imports System Imports QuickFix Public Class qf_app 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 here is the vb MAIN function '======================= Option Strict Off Option Explicit On Imports System Imports QuickFix Public Sub Main() Try Dim settings As New SessionSettings("d:\QuickFix\cfg\SupMon.cfg") Dim app As New qf_app() Dim storfact As New FileStoreFactory(settings) Dim logfact As New ScreenLogFactory(True, True, True) Dim msgfact As New DefaultMessageFactory() Dim sckinit As New QuickFix.SocketInitiator(app, storfact, settings, logfact, msgfact) sckinit.start() Console.Read() sckinit.stop() Catch ex As System.Exception MessageBox.Show(ex.Message) End Try End Sub '======================= ... and finally.. here is the error message I get when I run the application. It compiles fine, but then breaks as soon as it begins to execute. '======================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll', No symbols loaded. 'FixRouter': Loaded 'D:\Net Projects\GBC_R5\FixRouter.NET\bin\FixRouter.exe', Symbols loaded. 'FixRouter.exe': Loaded 'd:\net projects\gbc_r5\fixrouter.net\bin\quickfix_net_debug.dll', No symbols loaded. 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: FixRouter.qf_app. Assembly: FixRouter, Version=4.8.1465.26007, Culture=neutral, PublicKeyToken=null. The program '[402] FixRouter.exe' has exited with code 0 (0x0). '======================= Thanks, Sam > -----Original Message----- > From: Sa...@uc... <sa...@uc...> > To: qui...@li... > <qui...@li...> > Sent: Wed Dec 31 07:41:07 2003 > Subject: [Quickfix-developers] VB.NET Sample Code > > Hi all... > > I'm a long time VB guy trying to make the jump to the NET environment, and > use this product at the same time. ...and I'm not fairing too well. > > Would anyone know where I could see some coding examples - using the > QuickFix classes - done in VB.Net. I've been trying to reproduce the C# > example in VB.Net but having no luck. I tried make a VB version of the > Application class (inherits messagecracker, implements > Quickfix.Application). It compiles fine and then blows up when I run it - > some crap about me not implementing the interface - it's a lie! > > Thanks, > Sam > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > |