如何在Visual C ++ 2013 RC中使用ATL [英] How to use ATL in Visual C++ 2013 RC

查看:132
本文介绍了如何在Visual C ++ 2013 RC中使用ATL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管Windows Media Control的现有Visual C ++ 2012应用程序。 我几乎复制了Microsoft示例中的代码来执行此操作。 以下是该示例的链接。

I have an existing Visual C++ 2012 application that hosts the Windows Media Control.  I pretty much copied code from the Microsoft example to do it.  Here is the link to the example.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd563023(v = vs.85).aspx

为了使它在VS2012中工作,我不得不进入项目属性并设置"在DLL中使用ATL"。或类似的东西。 它工作正常。 当我将它转换为VS2013 RC时,它停止工作。该示例的第6步因E_FAIL而失败。 
以下是代码行:

In order to make it work in VS2012 I had to go into project properties and set "Use ATL in DLL" or something like that.  It worked as it should.  When I converted it to VS2013 RC it stopped working. Step 6 of the example fails with E_FAIL.  Here is the line of code:

hr = m_wndView.QueryHost(&spHost);

如果我在项目设置中没有打开ATL,我曾经得到完全相同的错误(E_FAIL)所以我进入了Visual C ++ 2013 RC项目设置,以查看ATL是否已打开。 但是,没有设置打开ATL,MS
表示他们现在将ATL改为静态。 这一切都很好,但我怎么让我的应用程序再次运行? 我错过了什么或VC ++ 2013 RC中是否有错误?

I used to get the exact same error (E_FAIL) if i didn't have ATL turned on in my project settings so I went into the Visual C++ 2013 RC project settings to see if ATL is turned on.  BUT, there is no setting for turning on ATL anymore and MS has said that they changed ATL to be static now.  That's all fine and dandy but how do I make my application work again?  Am I missing something or is there a bug in VC++ 2013 RC?

The Hinged Newt

The Hinged Newt

推荐答案

我没有这个,但具体而言。 我添加了它但是我收到了关于宏重新定义的警告,因此它包含在其他内容中。 但是,它没有帮助。我仍然得到相同的E_FAIL错误。
I do not have that but specifically.  I added it but I got a warning about macro redefinition so it is included in something else.  But, it didn't help. I still get the same E_FAIL error.


这篇关于如何在Visual C ++ 2013 RC中使用ATL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆