如果是选safearray,会提示我
[Error] Project2_TLB.pas(75): Type 'PSafeArray' has no type info
请问如何解决,谢谢!
我在程序里定义的数组
type
VariantInfo = record
fieldName:string;
fieldValue:string;
end;
type
VariantArrayType = array of VariantInfo; type
Tinsertobj = class(TMtsDataModule, Iinsertobj)
ADOConnection1: TADOConnection;
DataSetProvider1: TDataSetProvider;
ADOQuery1: TADOQuery; private
{ Private declarations }
protected
class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
procedure Method1(const vdatas: WideString 如果在这里设置参数为VariantArrayType,由于type libary里没有选会提示错误); safecall;
[Error] Project2_TLB.pas(75): Type 'PSafeArray' has no type info
请问如何解决,谢谢!
我在程序里定义的数组
type
VariantInfo = record
fieldName:string;
fieldValue:string;
end;
type
VariantArrayType = array of VariantInfo; type
Tinsertobj = class(TMtsDataModule, Iinsertobj)
ADOConnection1: TADOConnection;
DataSetProvider1: TDataSetProvider;
ADOQuery1: TADOQuery; private
{ Private declarations }
protected
class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
procedure Method1(const vdatas: WideString 如果在这里设置参数为VariantArrayType,由于type libary里没有选会提示错误); safecall;
会提示
[Error] Unit1.pas(33): Declaration of 'Method1' differs from declaration in interface 'Iinsertobj'
两个类型不一样啊 ?
在组件里写OleVariant即可,不用写成VariantArrayType,在外面调用时只要声明一个OleVariant类型的变量,把数组赋给它即可。