Y
yyg_delphi
Unregistered / Unconfirmed
GUEST, unregistred user!
function TCOClass_concustom.checkpeople(var as_in0: PSafeArray; var as_in1: PSafeArray): WideString;begin Result := DefaultInterface.checkpeople(as_in0, as_in1);end;//以上是PB写的一个COM,通过delphi的import type library导出单元后加入工程中! Param1 := VarArrayCreate([0,6], varVariant); Param2 := VarArrayCreate([0,7], varVariant); for iRow := 0 to 6 do begin if iRow = 0 then Param1[iRow] := 'R50101H01000' else if iRow = 1 then Param1[iRow] := '000' else Param1[iRow] := '无'; end; for iRow := 0 to 7 do begin if iRow = 0 then Param2[iRow] := '何考芽' else if iRow = 1 then Param2[iRow] := '441821197007140648' else if iRow = 2 then Param2[iRow] := '2009' else Param2[iRow] := '无'; end;FXNHCom.checkpeople(PSafeArray(TVardata(Param1).VArray),PSafeArray(TVardata(Param2).VArray));//现在的问题在,在调用PB写的COM的checkpeople函数后提示数组参数为空或为NULL,但在本地能取出数组中的内容!