passing SAFEARRAY from C++ to Visio

V

vdoser

Could anyone provide an operating code snippet on how to call a Visio method
with a SAFEARRAY** arg ?

Thank in advance ,
Serguei
 
N

Nikolay Belyh

I have just told you.
You just need to fill ALL items in the safearray.
The code below works just fine (draws a piece of parabola):

SAFEARRAY* psa = SafeArrayCreateVector(VT_R8, 0, 6);

for (long i = 0; i < 3; ++i)
{
long ix = i*2;
double valueX = i;
SafeArrayPutElement(psa, &ix, &valueX);

long iy = i*2 + 1;
double valueY = i*i;
SafeArrayPutElement(psa, &iy, &valueY);
}

page->DrawPolyline(&psa, 0);
SafeArrayDestroy(psa);

Kind regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top