Thanks for the reply.
The HRESULT value is 0. How can i extract the value from the VARIANT bounds? Which member of the bounds hold the bounding box value? Please answer me.
Thanks
Since the second argument of get_Bounds method is [out]parameter, there's no need to create safe array before the call. And what is the value of Hr?
Try to use this code snippet:
CComVariant bounds;
CComVariant inner(true);
HRESULT hr = SFPickNode->get_Bounds(&inner, &bounds);
if (SUCCEEDED(hr))
{
// do whatever you want with bounds
// ....
}
or, if ATL is not used:
VARIANT bounds;
VariantInit(&bounds);
VARIANT inner;
VariantInit(&inner);
V_VT(&inner) = VT_BOOL;
V_BOOL(&inner) = VARIANT_TRUE;
HRESULT hr = SFPickNode->get_Bounds(&inner, &bounds);
if (SUCCEEDED(hr))
{
// do whatever you want with bounds
// ....
VariantClear(&bounds);
}
VariantClear(&inner);
|
|