Jump to content
Software FX Community

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


User (Legacy)
 Share

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...