B
bellie
Unregistered / Unconfirmed
GUEST, unregistred user!
引用的某dll文件中定义了一接口类IDTVTree
有一属性connection
如下:
[
propget,
id(0x00000001),
helpstring("Get or Set the connection for this tree"),
helpcontext(0x00047124)
]
HRESULT _stdcall Connection([out, retval] IDispatch ** pVal );
[
propput,
id(0x00000001),
helpstring("Get or Set the connection for this tree"),
helpcontext(0x00047124)
]
HRESULT _stdcall Connection([in] IDispatch * pVal );
在vb中呢
这个Connection属性是object类型的
赋值也很简单
TheTree.Connection = DataConnection
其中Dataconncetion是ADODB.Connection类型
而在delphi中我想模仿vb的做法
用Thetree.connection:= Adoconnection1来赋值
可编译通不过
说Idispatch和Tadoconnection不匹配
怎么办
有一属性connection
如下:
[
propget,
id(0x00000001),
helpstring("Get or Set the connection for this tree"),
helpcontext(0x00047124)
]
HRESULT _stdcall Connection([out, retval] IDispatch ** pVal );
[
propput,
id(0x00000001),
helpstring("Get or Set the connection for this tree"),
helpcontext(0x00047124)
]
HRESULT _stdcall Connection([in] IDispatch * pVal );
在vb中呢
这个Connection属性是object类型的
赋值也很简单
TheTree.Connection = DataConnection
其中Dataconncetion是ADODB.Connection类型
而在delphi中我想模仿vb的做法
用Thetree.connection:= Adoconnection1来赋值
可编译通不过
说Idispatch和Tadoconnection不匹配
怎么办