I have written a c# program that retrieves history using the esignal API. My code works fine when I request smaller sets of data e.g. 30 days of daily data. Mostly I have been testing using the DAX index future AX Z1-DT and using tick bars. When I request 100T for 1 Day I get all the data with no error. However, when I request 2T for 1 day I start getting the following error AFTER the first +- 20000 bars have been received.
Unable to cast COM object of type 'System.__ComObject' to interface type 'IESignal.IHooks'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C5916B45-A7EB-4919-A742-AD47AE3AE996}' failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)). at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Obj ect objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
at IESignal.IHooks.get_GetBar(Int32 lHandle, Int32 lBarIndex)
at HistoricalDataServer.EsignalServer.processhistory( Int32 lHandle, HistoryRequest request) in C:\Users\jan\documents\visual studio 2010\Projects\HistoricalDataServer\HistoricalDataS erver\EsignalServer.cs:line 161
A first chance exception of type 'System.InvalidCastException' occurred in HistoricalDataServer.exe
In this example the number of bars returned by
eSignal.get_GetNumBars(lHandle);
was 88179. I was able to retrieve bar 88179 through to 59302 successfully, after which every other bar retrieval failed.
The call to
eSignal.ReleaseHistory(lHandle);
Also gave an error.
NB: this error only occurs when I retrieve dataset with tens of thousands of bars. I also get a similar problems when retrieving time and sales or minute bars.
I have attached an extract from my log to show how the error only occurs after a number of bars have been retrieved.
Hope someone can help with this problem.
Jan
Unable to cast COM object of type 'System.__ComObject' to interface type 'IESignal.IHooks'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C5916B45-A7EB-4919-A742-AD47AE3AE996}' failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)). at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Obj ect objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
at IESignal.IHooks.get_GetBar(Int32 lHandle, Int32 lBarIndex)
at HistoricalDataServer.EsignalServer.processhistory( Int32 lHandle, HistoryRequest request) in C:\Users\jan\documents\visual studio 2010\Projects\HistoricalDataServer\HistoricalDataS erver\EsignalServer.cs:line 161
A first chance exception of type 'System.InvalidCastException' occurred in HistoricalDataServer.exe
In this example the number of bars returned by
eSignal.get_GetNumBars(lHandle);
was 88179. I was able to retrieve bar 88179 through to 59302 successfully, after which every other bar retrieval failed.
The call to
eSignal.ReleaseHistory(lHandle);
Also gave an error.
NB: this error only occurs when I retrieve dataset with tens of thousands of bars. I also get a similar problems when retrieving time and sales or minute bars.
I have attached an extract from my log to show how the error only occurs after a number of bars have been retrieved.
Hope someone can help with this problem.
Jan
Comment