Sub CreateSSeFilter cdecl(filtertype as VARIANT ,filterdata as VARIANT,count as Integer,...)
dim i as Integer ,ft()As short ,fd() as VARIANT
Dim arg as cva_list
cva_start(arg ,Count)
dim vft as CVar
redim ft(count / 2 -1)
redim fd(count / 2-1)
dim cfarry as CSafeArray Ptr = New CSafeArray(vt_variant ,count/2 ,0)
for i = 0 To count-1
If i Mod 2 = 0 then
ft(i / 2) = cva_arg(arg ,short)
else
fd((i -1) / 2) = *cva_arg(arg ,VARIANT ptr)
cfarry->put((i -1) / 2,@fd((i -1) / 2))
End If
Next
cva_end(arg)
vft.PutShortArray(@ft(0),UBound(ft)+1)
filtertype = vft
cfarry->CopyToVariant(@filterdata)
End Sub
Function ToPoint(ByVal a As Double ,ByVal b As Double ,ByVal c As Double) As VARIANT'创建点
Dim v As cvar ptr = new CVAR
Dim p(2) As Double = {a ,b ,c}
v->putDoubleArray(@p(0) ,3)
Return v->vd
End Function
调用方法CreateSSetFilter(FT ,FD ,12,0 ,"Circle" ,8 ,"0" , -4 ,"=" ,40 ,25.0,-4,"=,=,=",10,CObjet(topoint(12,344,4324)).sptr)