Jump to content
Software FX Community

How to export chart to an OLE stream in C++?


User (Legacy)

Recommended Posts

Hi!

I'm trying to export chart data to an OLE stream ( IStream* ).

I pass CHART_CFXOLEFILE as the first argument to Export method.

But what should be the second argument?

It seems to be VARIANT structure but of what type? (VT_I4, VT_UNKNOWN, or

else?)

Here's my code:

IStream* pStream = ... // create stream here

VARIANT var;

V_VT(&var) = VT_UNKNOWN;

V_UNKNOWN(&var) = pStream;

HRESULT hr = pChartFX->Export(CHART_CFXOLEFILE, var);

pStream->Commit(...);

Export method returns S_OK but the stream remains empty (nothing is saved).

Please help!

Thanks in advance,

Serge

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...