什么是_WIN32_WINNT,它是如何工作的? [英] What is _WIN32_WINNT and how does it work?

查看:303
本文介绍了什么是_WIN32_WINNT,它是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑2:确定,所以我改变为Orwell DevC ++,其中包含winnt.h包含*#define KEY_WOW64_64KEY 0x0100 *,但它仍然不工作。 (请参阅编辑1:)

EDIT 2: Ok so I changed to Orwell DevC++ which contains the "winnt.h" that contains *#define KEY_WOW64_64KEY 0x0100* but it still is not working. (Refer to EDIT 1:)

编辑1:我调查了winnt.h沿着CodeBlock和DevC ++和DevC ++缺少以下行:

EDIT 1: I looked into the "winnt.h" which came along the CodeBlock and DevC++ and the DevC++'s is missing the following lines:

#if (_WIN32_WINNT >= 0x0502)
#define KEY_WOW64_64KEY 0x0100
#define KEY_WOW64_32KEY 0x0200
#endif

上面的代码在DevC ++的wint.h中不起作用。

And putting the above code in the wint.h of DevC++ doesn't work.

原始帖子:
我有一个32位应用程序(开发在DevC ++和Windows 7 64位)读取一个64位的应用程序的注册表作为其任务之一,所以我试图使用KEY_WOW64_64KEY标志RegOpenKeyEx,并发现了几个帖子,要使用_WIN32_WINNT:

在CodeBlock项目(测试项目)中使用它,但是相同的代码不能与DevC ++一起使用,我现在无法将其移植到代码块,因为代码块存在其他问题。

It worked like charm when I used it in a CodeBlock Project(a test project) but the same code is not working with DevC++, I can't port it to codeblock now since codeblock presents other problems.

感谢

推荐答案

它定义要使用的Windows头文件的版本。它必须在 #include< Windows.h> 之前声明。

It defines the version of the windows header files to use. It must be declared before you #include <Windows.h>.

还有一些其他类似的变量您应该可以设置是否要修改它:

There are a few other similar variables you should probably set if you're going to modify it:

MSDN使用Windows标题

这篇关于什么是_WIN32_WINNT,它是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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