I want to calculate the bounding box of the object.
// Create a safe array
SAFEARRAYBOUND SABound[1];
SABound[0].lLbound = 0;
SABound[0].cElements = 6;
SAFEARRAY *SArray = NULL;
SArray = SafeArrayCreate (VT_VARIANT, 1, SABound);
// Get the bounding box of the geometry
VARIANT Boundry;
VariantInit(&Boundry);
Boundry.vt = VT_ARRAY;
Boundry.parray = SArray;
VARIANT IncludeNode;
VariantInit(&IncludeNode);
IncludeNode.vt = VT_BOOL;
IncludeNode.lVal = TRUE;
Hr = SFPickNode->get_Bounds(&IncludeNode, &Boundry);
Could any one explain me how to get the six values from the VARIANT Boundry?
I've used the SafeArrayGetElement() function but it returns the value 0.
thanks in advance
|
|