Damian
-Interested User-
Posts: 2
Joined: Sep 4, 2004
|
Posted: Sep 4, 2004 02:15 PM
Msg. 1 of 2
Using API 2.3.0.2 I loaded the vbhistory COM app into VS.NET2003. It builds and I can get history, however, as soon as the tick history download is complete, it crashes with a system error.
I also wrote my own app in C# and the same identical behaivor occurs. I get the history, handle the event below: this.hlookup.TickCompleted += new DTNHISTORYLOOKUPLib._IHistoryLookupEvents_TickCompletedEventHandler(hlookup_TickCompleted);
Then crash. Note that the VB6 history.exe COM app runs fine. It only does this when I try to build the app myself in VS.NET 2003. Anyone have any ideas here?
|
Damian
-Interested User-
Posts: 2
Joined: Sep 4, 2004
|
Posted: Sep 4, 2004 05:24 PM
Msg. 2 of 2
Ok, I've narrowed it down. When using the VB or C# com historylookup in VS2003, if I register more than one event handler, I get the system error (memory overflow).
In the VB sample app, when I run it as is after importing into VS2003, it crashes after successfully downloading data. If I then remove all subs except for hlookup_TickCompleted, it will run fine for a tick data request.
The same thing is true in my C# app, if I only handle a single event, it works.
Within my C# app I handle these events: this.hlookup.TickCompleted += new DTNHISTORYLOOKUPLib._IHistoryLookupEvents_TickCompletedEventHandler(hlookup_TickCompleted); this.hlookup.MinuteCompleted += new DTNHISTORYLOOKUPLib._IHistoryLookupEvents_MinuteCompletedEventHandler(hlookup_MinuteCompleted);
I get the identical error that I get with the VB app, however, if I comment out MinuteCompleded, OR VICE VERSA, the error does not occur.
As a work around, I dynamically register, unregister the events so that only one event is handled at any given time, this works. However, I want to have both the completed and progress handlers at the same time, can this be fixed?
Thanks, Damian
|