RE: [Quickfix-developers] Problem with VB.NET
Brought to you by:
orenmnero
From: <or...@qu...> - 2004-05-31 17:53:01
|
<div>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.<BR></div> <div>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.</div> <div> </div> <div>--oren</div> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid"><BR>-------- Original Message --------<BR>Subject: [Quickfix-developers] Problem with VB.NET<BR>From: "Ramprakash Umapathy" <ram...@ca...><BR>Date: Mon, May 24, 2004 5:43 am<BR>To: qui...@li...<BR><BR>Hi All,<BR><BR>I'm a newbie trying to use QuickFix in VB.NET<BR><BR>I ran into problems with my code here. Could anyone of help me to solve. I<BR>have seen a similar post with no answers. I use like this in my VB.NET code,<BR><BR><BR>Imports QuickFix<BR>Public Class QFapp<BR> Inherits QuickFix.MessageCracker<BR> Implements QuickFix.Application<BR><BR> Public Sub toApp(ByVal msg As QuickFix.Message, ByVal sid As<BR>QuickFix.SessionID) Implements QuickFix.Application.toApp<BR> End Sub<BR><BR> Public Sub fromAdmin(ByVal msg As QuickFix.Message, ByVal sid As<BR>QuickFix.SessionID) Implements QuickFix.Application.fromAdmin<BR> End Sub<BR><BR> Public Sub onCreate(ByVal sid As QuickFix.SessionID) Implements<BR>QuickFix.Application.onCreate<BR> End Sub<BR><BR> Public Sub onLogon(ByVal sid As QuickFix.SessionID) Implements<BR>QuickFix.Application.onLogon<BR> End Sub<BR><BR> Public Sub onLogout(ByVal sid As QuickFix.SessionID) Implements<BR>QuickFix.Application.onLogout<BR> End Sub<BR><BR> Public Sub toAdmin(ByVal msg As QuickFix.Message, ByVal sid As<BR>QuickFix.SessionID) Implements QuickFix.Application.toAdmin<BR> End Sub<BR><BR> Public Sub fromApp(ByVal msg As QuickFix.Message, ByVal sid As<BR>QuickFix.SessionID) Implements QuickFix.Application.fromApp<BR> End Sub<BR><BR>End Class<BR><BR>And then I call like this,<BR><BR>Imports QuickFix<BR><BR>Module Module1<BR><BR> Sub Main()<BR><BR> Try<BR><BR> 'Get Setting from ini file<BR> Dim ss As New SessionSettings("c:\client.ini")<BR> Dim sInit As SocketInitiator<BR> Dim sapp As New QFapp<BR><BR> Dim storeFactory As New FileStoreFactory(ss)<BR> Dim logFactory As New FileLogFactory("c:\test.log")<BR> Dim msgFactory As New DefaultMessageFactory<BR><BR><BR> 'Initiator Section<BR> sInit = New SocketInitiator(sapp, storeFactory, ss, msgFactory)<BR> 'sInit = New SocketAcceptor(sapp, storeFactory, ss, logFactory,<BR>msgFactory)<BR><BR> sInit.start()<BR><BR> sInit.stop()<BR><BR><BR><BR><BR><BR> Catch ex As System.Exception<BR><BR> Trace.WriteLine(ex.Message)<BR> Trace.WriteLine(ex.StackTrace)<BR><BR> End Try<BR><BR> End Sub<BR><BR>End Module<BR><BR><BR>The System throws an Error (doesn't even caught in Catch Block) with the<BR>following message,<BR><BR><BR>An unhandled exception of type 'System.TypeLoadException' occurred in<BR>Unknown Module.<BR><BR>Additional information: Signature of the body and declaration in a method<BR>implementation do not match. Type: TestFixEngine.QFapp. Assembly:<BR>TestFixEngine, Version=1.0.1605.20104, Culture=neutral, PublicKeyToken=null.<BR><BR>TIA,<BR><BR>Holy<BR><BR><BR>P.S: I could be helpful in anyone of you point out the QuickFix VB.NET<BR>Resources<BR><BR><BR><BR>-------------------------------------------------------<BR>This SF.Net email is sponsored by: Oracle 10g<BR>Get certified on the hottest thing ever to hit the market... Oracle 10g. <BR>Take an Oracle 10g class now, and we'll give you the exam FREE.<BR>http://ads.osdn.com/?ad_id149&alloc_id66&op=click<BR>_______________________________________________<BR>Quickfix-developers mailing list<BR>Qui...@li...<BR>https://lists.sourceforge.net/lists/listinfo/quickfix-developers </BLOCKQUOTE> |