读取注册表的内容----急
我的代码是:
char *data = new char[100+1];
LPDWORD size = new DWORD;
*size = 100;
result = ::RegQueryValueEx(hKey,
"IFDType",
NULL,
REG_SZ,
(LPBYTE *)data,
&size);
它的错误信息为:
error C2664: 'RegQueryValueExA' : cannot convert parameter 4 from 'const int' to 'unsigned long *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
char *data = new char[100+1];
LPDWORD size = new DWORD;
*size = 100;
result = ::RegQueryValueEx(hKey,
"IFDType",
NULL,
REG_SZ,
(LPBYTE *)data,
&size);
它的错误信息为:
error C2664: 'RegQueryValueExA' : cannot convert parameter 4 from 'const int' to 'unsigned long *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
...全文
相关推荐
Qt读取注册表中内容
以下是一个基本的头文件导入:```cpp#include <QWindowsRegistryKey>```在Qt中读取注册表内容通常涉及到以下几个步骤:1.
Python读取Windows注册表的实战代码
本文主要介绍了Python读取Windows注册表的实战代码,希望能对学习Python的同学们有所帮助。 文章目录 1. 基本概念介绍 1.1 注册表 1.2 contextlib.suppress() 2. 案例介绍 3. 代码实战 3.1 导库 3.2 定义函数 3.3 完整代码
使用Python读取Windows注册表
1. 基本概念介绍 1.1 注册表 1.2 contextlib.suppress() 2. 案例介绍 3. 代码实战 3.1 导库 3.2 定义函数 3.2 完整代码
js调用本地exe(根据注册表读取内容)
接下来,关于“根据注册表读取内容”,在Node.js环境下,可以使用第三方库如`windows-regedit`来读取Windows注册表:```javascriptconst regedit = require
QT读取注册表总结
在实际应用中,可能需要读取系统级的注册表项,这时可以使用QSettings的构造函数指定使用系统范围的注册表配置。


