添加不兼容64位的资源文件的导入. [英] Resource file adding imports that are not 64 bit compatible.

查看:73
本文介绍了添加不兼容64位的资源文件的导入.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新我的资源文件上的版本号后,Visual Studios删除了一个导入(winres.h),并取消了对不兼容64位的旧版头文件(afxres.h)的注释.我正在构建WDK 600(Windows驱动程序开发套件)随附的oemuni示例驱动程序.我需要更改项目中的某些设置来解决此问题吗?在更改版本号之前,这是我的标头的中间版本:

After updating the version number on my resource file, Visual Studios removed an import (winres.h) and uncommented a legacy header file that was not 64 bit compatible (afxres.h).  I'm building an oemuni sample driver provided with the WDK 600 (Windows Driver Development kit).  Is there some setting in the project I need to change to resolve this problem?  Here's a cencored version of my header before changing the version number:

代码段

推荐答案

我没有完全相同的问题,并且我不确定自己到底是怎么回事,但是每次在eVC ++ 4中进行更改时,使用eVC ++ 4编辑MSVC ++ 2008e的(ex-MFC)资源时,我都遇到类似的问题:
对话框编辑器,我会得到"#include afxres.h"在我的.rc顶部,然后我必须手动重新捏造才能使其与MSVC ++ 2008e一起使用.

我*相信*发生了什么事,请降低文件中有一个部分:
I am not having exactly the same problem, and I'm not *entirely* sure what is going on, but I was experiencing a similar problem using eVC++4 to edit (ex-MFC) resources for MSVC++2008e:
every time I made a change in the dialog editor, I'd get "#include afxres.h" at the top of my .rc, which I'd then have to manually re-fudge to get it to work with MSVC++2008e.

I *believe* what is happening is, lower down the file there is a section:
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif\r\n"
    "#include ""res\\metronome.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\0"
END

#endif    // APSTUDIO_INVOKED


尚未实际编译,但用于填充资源文件的页眉和页脚(已对页眉和页脚进行*编译).因此,我在此部分上使用适当的非mfc部分进行了复制粘贴(我从MFC项目中继承"了.rc):


that is not actually compiled, but is used to populate the header and footer of the resource file (the header and footer *are* compiled).  So I copy-pasted over this section with a proper non-mfc section (I had "inherited" the .rc from an MFC project):

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

2 TEXTINCLUDE DISCARDABLE
BEGIN
    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
    "#include ""windows.h""\r\n"
    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
    "#include ""resource.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE
BEGIN
    "\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


似乎已经解决了!


and that seems to have fixed it!


这篇关于添加不兼容64位的资源文件的导入.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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