用后绑定访问COM非默认接口的成员 ( 积分: 200 )

M

mywuti

Unregistered / Unconfirmed
GUEST, unregistred user!
it1Disp:ItTest1Disp ;
it2Disp:ItTest2Disp;
it2:ItTest2;
it1Disp:=CreateComObject(CLASS_comTest) as ItTest1Disp;
//OK
it1Disp.GetID1(id);
//OK
it2Disp:=CreateComObject(CLASS_comTest) as ItTest2Disp;
//OK
it2Disp.GetID2(id);
//失败,找不到成员

it2:=CreateComObject(CLASS_comTest) as ItTest2;
//OK
it2.GetID2(id);
//OK
也就是说, 可以访问到第二个dispinterface接口it2Disp,但无法访问到其中的成员,只能通过早绑定才能访问到?
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
933
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部