佚名通过本文主要向大家介绍了
一个奇怪问题,你知道吗?等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 一个奇怪问题,你知道吗?
描述:
解决方案1:
描述:
要使用#import指令引入一个类型库文件#import "C:\WINNT\system32\wmp.dll" no_namespace
并且选择project->Components插入一个media控件,因为插入的media控件没有封装WMPControls3接口所以使用#import引入。
声明如下:
IWMPControls3Ptr m_WMPControls3;
CWMPPlayer4 m_player;
HRESULT hr=S_OK;
hr=m_WMPControls3.CreateInstance(__uuidof(IWMPControls3));
m_WMPControls3 = m_player.GetControls(); //错误
这样作可以吗?我想知道怎样赋值。
解决方案1:
看了上面的代码,知道第一个接口可以QueryInterface到,不妨通过这个接口来QueryInterface m_WMPControls3的接口指针,不知道包容和引用的两种方式是否是这样调用的
如果这样也找不到的话,就需要怀疑m_WMPControls3是否存在了