That's weird. I wrote a little program to get OpenInterest . But the program only can work short time.
About 10 or more minutes , XMLGetFundamentalData will crash with Error code 0x80010100 , the error code was return by raw_XMLGetFundamentalData.
My Code-Segment
void CES2TCPDlg::ES_OnQuoteChanged(CString strSymbol)
{
try
{
if(NULL == m_pXMLDoc)
{
ASSERT(NULL);
return;
}
BSTR bStr = strSymbol.AllocSysString();
_bstr_t bstrString(bStr);
SysFreeString(bStr);
_bstr_t fundamentalXML = (*m_piHooks)->XMLGetFundamentalData(bstrString , ftfOPENINT , 0);
CString strValue;
HRESULT hr;
VARIANT_BOOL bStatus;
hr = m_pXMLDoc->loadXML(fundamentalXML , &bStatus);
IS_HR_FAILED(hr);
if(VARIANT_TRUE != bStatus)
{
ASSERT(FALSE);
return;
}
strQuote = B2S(fundamentalXML);
if(-1 != strQuote.Find("OpenInterest"))
{
hr = GetValueFromXMLDoc(m_pXMLDoc , "OpenInterest" , strValue);
if(SUCCEEDED(hr))
{
UpdateItemValue(strSymbol , "OpenInterest" , strValue);
SetLastUpdate(strSymbol , "OpenInterest" , strValue);
}
}
}
catch (_com_error &e)
{
dump_com_error(e);
return;
}
}
BTW : I Use eSignal v7.8 Under WinXP
Best Regards
About 10 or more minutes , XMLGetFundamentalData will crash with Error code 0x80010100 , the error code was return by raw_XMLGetFundamentalData.
My Code-Segment
void CES2TCPDlg::ES_OnQuoteChanged(CString strSymbol)
{
try
{
if(NULL == m_pXMLDoc)
{
ASSERT(NULL);
return;
}
BSTR bStr = strSymbol.AllocSysString();
_bstr_t bstrString(bStr);
SysFreeString(bStr);
_bstr_t fundamentalXML = (*m_piHooks)->XMLGetFundamentalData(bstrString , ftfOPENINT , 0);
CString strValue;
HRESULT hr;
VARIANT_BOOL bStatus;
hr = m_pXMLDoc->loadXML(fundamentalXML , &bStatus);
IS_HR_FAILED(hr);
if(VARIANT_TRUE != bStatus)
{
ASSERT(FALSE);
return;
}
strQuote = B2S(fundamentalXML);
if(-1 != strQuote.Find("OpenInterest"))
{
hr = GetValueFromXMLDoc(m_pXMLDoc , "OpenInterest" , strValue);
if(SUCCEEDED(hr))
{
UpdateItemValue(strSymbol , "OpenInterest" , strValue);
SetLastUpdate(strSymbol , "OpenInterest" , strValue);
}
}
}
catch (_com_error &e)
{
dump_com_error(e);
return;
}
}
BTW : I Use eSignal v7.8 Under WinXP
Best Regards
Comment