Click here to Skip to main content
15,889,096 members
Articles / Desktop Programming / MFC

Import/Export Registry Sections as XML

Rate me:
Please Sign up or sign in to vote.
4.33/5 (16 votes)
21 Jan 20033 min read 166.7K   6.1K   73  
Export registry sections as XML to simplify registry diffs
This article details a tool aimed to import/export registry sections in XML format, to make registry diff easier in practice.
#pragma once


void AddChildren(CTreeCtrl &tree, HTREEITEM hItem, CString &szPath);
void AddChildRegistryKeys(CTreeCtrl &tree, HTREEITEM hParent, HKEY hKey);



void AddRegistryValues(HKEY hKey, CPtrArray &arrValues);
CString ConvertToString(DWORD dwType, LPTSTR szRawBuffer, DWORD nLen);
CString StringFromValueType(DWORD nType);


BOOL SaveAsXml( XmlWriter &w, BOOL bFaked, CString &szPath);
BOOL SaveAsXml( XmlWriter &w, BOOL bFaked, CString &szKeyname, HKEY hKey);


CString GetEscapedXmlString(CString &szInput); // Xml escape chars
CString UTF8Conversion(CString &s); // local charset ==> UTF8

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
France France
Addicted to reverse engineering. At work, I am developing business intelligence software in a team of smart people (independent software vendor).

Need a fast Excel generation component? Try xlsgen.

Comments and Discussions