Announcement

Collapse
No announcement yet.

ActiveX calls fail

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActiveX calls fail

    C++ Desktop API:

    Calls to GetGetTimeSalesBar() fail regularly with a com exception, while retrieving tick histories during market hours, and then all other ActiveX calls fail as well. I can reduce the incidence of the problem by reducing the rate at which I call the function, but I haven't managed to make it go away.

    Any ideas of things I might try, or is this just something I have to live with?

  • #2
    Is your app multi-threaded?

    I haven't had that problem in my single threaded app. I did have some issues when I ran multiple threads, but didn't have time to play with it more so it might have been my fault.

    Comment


    • #3
      No, I'm doing all of my calls to the ActiveX interface from a single thread. The part of my code that experiences the com exception is in a loop that retrieves a tick iteratively, until the number of bars count does not change while I am retrieving the tick.

      The root problem is that the index base for ticks can change at any time during market hours, so the only way I can know for sure what index to which the returned data corresponds, is to make sure the index base did not change during my call. So I have to do this ridiculous iterative loop, which eventually resultings in a com exception (I'm guessing because of some queue overrun or similar problem inside the ActiveX interface).

      The upshot is that I'm about to give up, after spending hundreds of hours trying to get useful data through the desktop API interface. It would have been hard to produce a more unusable interface, to what I think is basically good data.

      Comment

      Working...
      X