I’m about to make a SAFEARRAY and pas it into a this function:
void IAcadSelectionSet::AddItems(const VARIANT& pSelSet)
{
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
&pSelSet);
}
At first I don’t really know why I know the pSelSet is a SAFEARRAY.
I know I have to do something like:
VARIANT var;
VariantInit( &var );
var.vt = VT_ARRAY;
But when I do then do this call:
myIAcadSelectionSet.AddItems( var );
it craches!!
Of course the array is empty but would the call crash cause of that?
I’m soon clear with the meaning of COM-calls but now I’m stucked.
void IAcadSelectionSet::AddItems(const VARIANT& pSelSet)
{
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
&pSelSet);
}
At first I don’t really know why I know the pSelSet is a SAFEARRAY.
I know I have to do something like:
VARIANT var;
VariantInit( &var );
var.vt = VT_ARRAY;
But when I do then do this call:
myIAcadSelectionSet.AddItems( var );
it craches!!
Of course the array is empty but would the call crash cause of that?
I’m soon clear with the meaning of COM-calls but now I’m stucked.