Click here to Skip to main content
12,066,952 members (58,785 online)
Click here to Skip to main content

Stats

117.2K views
4.8K downloads
70 bookmarked
Posted

Import/Export registry sections as XML

, 21 Jan 2003
Export registry sections as XML to simplify registry diffs
registryasxml_demo.zip
ReleaseMFCdll
registryasxml.exe
Release
registryasxml.exe
registryasxml_src.zip
registryxml.dsp
registryxml.dsw
res
Icon_Anchor.jpg
Icon_Form.jpg
Icon_Frame.jpg
Icon_Media.jpg
Icon_Root.jpg
ImageList.bmp
ImageList256.bmp
registryxml.ico
RegistryxmlDoc.ico
TocImageList.bmp
Toolbar.bmp
registryxml.opt
registryxml.plg
registryxml.suo
registryasxml__demo.zip
registryasxml.exe
registryasxml.exe
registryasxml__src.zip
registryxml.dsp
registryxml.dsw
Icon_Anchor.jpg
Icon_Form.jpg
Icon_Frame.jpg
Icon_Media.jpg
Icon_Root.jpg
ImageList.bmp
ImageList256.bmp
registryxml.ico
RegistryxmlDoc.ico
TocImageList.bmp
Toolbar.bmp
#pragma once

long Helper_OpenKey(CString &szMainKey, CString &szPath, HKEY *pKey);

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);
void ConvertFromString(CString &szValue, DWORD dwType, LPSTR *szRawBuffer, DWORD *nLen);
CString StringFromValueType(DWORD nType);
DWORD TypeFromString(CString &szValueType);
char ConvertToDecimal(char c1, char c2);

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




BOOL LoadAsXml( XmlReader &r, CString &szFilename);
HKEY LoadAsXml_OpenKey(CPtrArray &arrInternalKeyLoads);
void LoadAsXml_CloseKey(HKEY hKey);
void LoadAsXml_SetValue(HKEY hKey, CString &szName, CString &szValue, CString &szType);


CString GetEscapedXmlString(CString szInput); // Xml escape chars ( " ==> &quot;, < ==> &lt;, & ==> &amp;)
CString UTF8Conversion(CString &s); // local charset ==> UTF8

CString GetUnescapedXmlString(CString szInput); // Xml escape chars (&quot; ==> ", &lt; ==> <, &amp; ==> &);
CString FromUTF8Conversion(CString &s); // UTF8 ==> local charset


struct InternalKeyLoad // used in LoadAsXml
{
	CString szKeyname;
	HKEY hKey;
};

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

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.


You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160208.1 | Last Updated 22 Jan 2003
Article Copyright 2002 by Stephane Rodriguez.
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid