Frage

I'm programming an application in javascript which uses activeX object.
The ActiveX function gets a VARIANT parameter from javascript call.

If I define a global variable named *V1 and compare it to the get variable, like this:

V1 = &variant;

It doesn't work because the data lost after function ends.
How can I clone the variant safely and easily?

War es hilfreich?

Lösung

Use VariantCopy function (link)

VARIANT v1;
VariantCopy(&v1, &variant);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top