Jump to content
Software FX Community

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


User (Legacy)

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

Archived

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

×
×
  • Create New...