Click here to Skip to main content
15,884,943 members
Articles / Desktop Programming / MFC

Very secure method to save and restore registry

Rate me:
Please Sign up or sign in to vote.
4.18/5 (10 votes)
23 Aug 20047 min read 71K   988   20  
This article gives a very secure method to save and restore registry keys. It provides a ready to use tool in both command-line and UI modes.
// CRC32.h: interface for the CCRC32 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CRC32_H__A4F2A0C3_012C_44C2_8F33_200CC6AE4758__INCLUDED_)
#define AFX_CRC32_H__A4F2A0C3_012C_44C2_8F33_200CC6AE4758__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CCRC32  
{
public:
	DWORD FileCrc32String(LPCTSTR szFilename, CString &CRC32);
	CCRC32();
	virtual ~CCRC32();
	void FreeTable(void);
	void InitTable(void);

protected:
	DWORD FileCrc32(LPCTSTR szFilename, DWORD &dwCrc32);

protected:
	DWORD *m_pdwCrc32Table;


};

#endif // !defined(AFX_CRC32_H__A4F2A0C3_012C_44C2_8F33_200CC6AE4758__INCLUDED_)

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


Written By
Web Developer
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions