Jump to content
Software FX Community

Saving the chart template to an OLE file, using the IPersistStreamInit interface


User (Legacy)
 Share

Recommended Posts

Hi,

I know that the Export method from the IDispatch interface can be utilized

to save a template of the chart without the data. My question, is that I am

using the IPersistStreamInit interface to save the chart, and I was

wondering how I could go about eliminating the data in this method.

A snippet of my code is shown below...do I need to call the Export method,

or is there another interface I need to use?

IPersistStorage *pIPS;

IPersistStreamInit *pIPSI;

hr = pObject->QueryInterface(IID_IPersistStorage,(void **)&pIPS);

if (SUCCEEDED(hr))

hr = pIPS->QueryInterface(IID_IPersistStreamInit,(void

**)&pIPSI);

pIPS->Release();

if (SUCCEEDED(hr)) {

CLSID clsID;

hr = pIPSI->GetClassID(&clsID);

hr = WriteClassStm(pStream, clsID);

hr = pIPSI->Save(pStream, TRUE);

pIPSI->Release();

}

}

pStream->Release();

return hr;

Thanks

Abe Krebs

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...