User (Legacy) Posted December 18, 2002 Report Share Posted December 18, 2002 ChartFX write nothing in my stream. There is no error in return export function, but IStream::Stat function retrieve no size. If I try to export with CHART_CFXOLEFILE, I have an error: 0x800004005. What may be the problem? Thanking you in advance, sample code: ------------- IStreamPtr pStream; HRESULT hResult = CreateStreamOnHGlobal (NULL, TRUE, &pStream); VARIANT varValue; if (SUCCEEDED(hResult)) { V_VT(&varValue) = VT_UNKNOWN;//VT_STREAM; V_UNKNOWN(&varValue) = m_pStream; hResult = m_pChartFX->Export(CHART_CFXFILE, varValue); STATSTG stg; memset (&stg, 0x00, sizeof(STATSTG)); hResult = m_pStream->Stat (&stg, 0); } Link to comment Share on other sites More sharing options...
Software FX Posted December 18, 2002 Report Share Posted December 18, 2002 You need to use the following code: V_VT(&varValue) = VT_STREAM; V_UNKNOWN(&varValue) = m_pStream; m_pChartFX->raw_Export(CHART_CFXFILE, &varValue,&hResult); The _variant_t wrapper can't handle VT_STREAM -- FP Software FX Support "pascal j." <pascal.jubeauxREMOVEME@dataset.frNOSPAM> wrote in message news:olTd2TppCHA.2684@webserver1.softwarefx.com... > ChartFX write nothing in my stream. > There is no error in return export function, but IStream::Stat function > retrieve no size. > If I try to export with CHART_CFXOLEFILE, I have an error: 0x800004005. > > What may be the problem? > > Thanking you in advance, > > > sample code: > ------------- > IStreamPtr pStream; > HRESULT hResult = CreateStreamOnHGlobal (NULL, TRUE, &pStream); > VARIANT varValue; > > if (SUCCEEDED(hResult)) > { > V_VT(&varValue) = VT_UNKNOWN;//VT_STREAM; > V_UNKNOWN(&varValue) = m_pStream; > hResult = m_pChartFX->Export(CHART_CFXFILE, varValue); > STATSTG stg; > memset (&stg, 0x00, sizeof(STATSTG)); > hResult = m_pStream->Stat (&stg, 0); > } > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.