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); } Quote 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); > } > > Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.