检索Windows注册表 [英] Retrieve Windows Registry

查看:97
本文介绍了检索Windows注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在使用Windows注册表.

将.xml文件路径添加到Windows注册表中,例如"RegSetValueEx(HKEY_CURRENT_USER,",0,REG_SZ,(const BYTE *)"D:\\ facedata.xml",512);"

现在,我想读取.xml文件的所有内容并将其存储在某个变量中.

我从某个时候开始在这些注册表上浏览网络.

从.xml文件读取内容的任何想法.

预先感谢.

Hello,

I am working with windows registry.

Added the .xml file path to the windows registry like this " RegSetValueEx(HKEY_CURRENT_USER, "", 0, REG_SZ, (const BYTE*)"D:\\facedata.xml", 512);"

Now i want to read all the contents of .xml file and store in to some variable.

I had been surfing through the net from sometime on these registry.

Any Ideas for reading the contents from .xml file.

Thanks in advance.

推荐答案

读取XML文件的内容与注册表无关.
但是,由于要在注册表中存储文件的路径,因此可以使用RegQueryValueEx函数首先将文件路径读入变量.

要简单地读取文件的内容并将其存储到变量中,可以使用CreateFileReadFile API.
但是,如果要解析XML并对其进行操作,则需要使用XML文档对象模型(DOM).
您可以从这里开始- XML DOM入门指南 [ ^ ]
Reading the contents of an XML file has nothing to do with the registry.
However, since you''re storing the path to the file in the registry, you can use the RegQueryValueEx function to first read the file path into a variable.

To simply read the contents of the file and store to a variable, you can use the CreateFile and ReadFile APIs.
However, if you want to parse the XML and manipulate it, you need to use the XML Document Object Model (DOM).
You could start here - A Beginner''s Guide to the XML DOM[^]


这篇关于检索Windows注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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