Click here to Skip to main content
15,895,799 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 167.9K   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.
#include "stdafx.h"
#include "registryxml.h"
#include "MainFrame.h"
#include "registryxmlDoc.h"

#include "registryxmlTree.h"
#include "baseTypes.h"



#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc

IMPLEMENT_DYNCREATE(registryxmlDoc, CDocument)

BEGIN_MESSAGE_MAP(registryxmlDoc, CDocument)
	//{{AFX_MSG_MAP(registryxmlDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc construction/destruction

registryxmlDoc::registryxmlDoc()
{
	// TODO: add one-time construction code here
	m_hRoot=NULL;
}

registryxmlDoc::~registryxmlDoc()
{
}

BOOL registryxmlDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	SetTitle("");

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc serialization

void registryxmlDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc diagnostics

#ifdef _DEBUG
void registryxmlDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void registryxmlDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG






/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc commands







/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc methods





HTREEITEM	registryxmlDoc::getParentHTREEITEM()
{
	return m_hRoot;
}















/////////////////////////////////////////////////////////////////////////////
// registryxmlDoc message handlers



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