VC COM中通过一个接口的属性访问另一个接口的问题

qsy101 2014-02-11 09:54:39
中文:
MyDllTest调用HwaRader.dll,在HwaRader.dll中有IIRader接口,IIviDriver是IIRader的父类,在IIviDriver中
通过属性的方式去调用Identity(即IIviDriverIdentity)的方法,但是却出现了错误,这是怎么回事呢??高手们
可以帮我解决一下吗?真的很感谢了~
在一个接口中通过属性访问调用另一个接口,真的需要耗费一定的精力啊!
打开"MyDllTest\Exe\MyDllTest.exe",点击"TEST"调用“m_IRaderPtr->Identity->Description”将会出错,但是如果
调用的是"m_IRaderPtr->Close()",就不会出错的。

源码请看附件:http://pan.baidu.com/s/1ntry4OD
English:
MyDllTest call HwaRader.dll,There IIRader interface HwaRader.dll in,IIviDriver is IIRader's parent class,
I want to call Identity(IIviDriverIdentity) by the way of call the IIviDriver's property,But it was an error,
this is how it happened,Gurus, Can you help me solve it? I really appreciate the ~
In a call to another interface by other interface accessed via the property really takes some effort ah! ~
open"MyDllTest\Exe\MyDllTest.exe", when you Click the "TEST" call “m_IRaderPtr->Identity->Description”will be wrong,
but you call "m_IRaderPtr->Close()" is rigth.
Source See Annex:http://pan.baidu.com/s/1ntry4OD
...全文
294 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qsy101 2014-02-11
  • 打赏
  • 举报
回复
自己顶顶~很希望得到大家的帮助~
qsy101 2014-02-11
  • 打赏
  • 举报
回复
自己再顶一下~~~

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧