A apw Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-11 #1 Delphi中经常可将COM接口转换写成: IAInterface as IBInterface 其中的as在BCB中应如何写。
W wghmy Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-11 #2 BCB很久没有弄过了 用强制转换不就行了么 (IAInterface *)(IBInterface)
A apw Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-11 #3 如此写法,编译都通不过。 在Delphi有: IAInterface a = dcOpt->AppServer as IAInterface; 在BCB我用 IDispatch *pdis = (IDispatch*)(dcOpt->AppServer); IAInterface* pAi = (IAInterface*)pdis; 则得不正确指针。
如此写法,编译都通不过。 在Delphi有: IAInterface a = dcOpt->AppServer as IAInterface; 在BCB我用 IDispatch *pdis = (IDispatch*)(dcOpt->AppServer); IAInterface* pAi = (IAInterface*)pdis; 则得不正确指针。
S Sachow Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-24 #4 IDispatch* disp = (IDispatch*)(DM->SConn->AppServer); IMySvrDisp Intf((IMySvr*)disp); Intf.DoMyFunc(1, 2);
IDispatch* disp = (IDispatch*)(DM->SConn->AppServer); IMySvrDisp Intf((IMySvr*)disp); Intf.DoMyFunc(1, 2);
J JamesBond_L Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-24 #5 IAInterface* pAi = (IAInterface *)(dcOpt->AppServer); 我觉得可以,他们是否是同一个父类的啊?
A apw Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-24 #7 try [swf]http://delphibbs.com/delphibbs/images/dfw.swf[/swf]