Jump to content
Software FX Community

Multiple imports of the same template.

User (Legacy)

Recommended Posts

Is there any reason I can't import the same template into more than one 


For instance, I've got the following code:

// pChart1 and pChart2 are valid ChartFX IChartFX pointers (the objects

already exist.)

// pStream is an IStream* which contains a previously

// exported CHART_CFXOLETEMPLATE stream.

long nRetVal = 0;

// Copy the stream into variant.

VARIANT vChartFXTemplate;


V_VT(&vChartFXTemplate) = VT_STREAM;

V_UNKNOWN(&vChartFXTemplate) = pStream;

pChart1->raw_Import(CHART_CFXOLETEMPLATE, vChartFXTemplate, &nRetVal);

pChart2->raw_Import(CHART_CFXOLETEMPLATE, vChartFXTemplate, &nRetVal);

Now when I display pChart1 and pChart2, only pChart1 has the template

applied to it and pChart2 shows the default properties. The returned HRESULT

is S_OK for both calls, and nRetVal is 0 for both calls.



Link to comment
Share on other sites


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

  • Create New...