如何读取注册表项(Native C ++)中的所有值名称? [英] How to read all value names in a registry key (Native C++)?
本文介绍了如何读取注册表项(Native C ++)中的所有值名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,我可以在C#中做到这一点
string[] names = Registry.CurrentUser.OpenSubKey("KEYNAME",true).GetValueNames();
解决方案
您可以使用以下功能:
RegOpenKeyEx [ ReqQueryInfoKey [ RegEnumValue [ RegCloseKey [此处看看 [ HMODULE hMod = LoadLibrary(" ); pre>
如果hMod!= NULL
FreeLibrary(hMod);
结束代码
For example I can do it like this in C#
string[] names = Registry.CurrentUser.OpenSubKey("KEYNAME",true).GetValueNames();
解决方案
You can use these functions:
RegOpenKeyEx[^]
ReqQueryInfoKey[^]
RegEnumValue[^]
RegCloseKey[^]
Have a look here[^] for an example.
I do this using RegOpenKeyEx and RegQueryValueEx. Precede the code with
HMODULE hMod = LoadLibrary("advapi32.dll");
End the code withFreeLibrary(hMod);if hMod != NULL
这篇关于如何读取注册表项(Native C ++)中的所有值名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文