Click here to Skip to main content
15,891,657 members
Articles / Programming Languages / C++

Undo and Redo the "Easy" Way

Rate me:
Please Sign up or sign in to vote.
4.95/5 (42 votes)
20 Jun 2004CPOL22 min read 290.3K   8.6K   114  
This article introduces a simple approach to in-memory transactions that can be used to implement Undo and Redo. The technique uses SEH and Virtual Memory and requires only STL and Win32.
// CrashFileNames.h  Version 1.4
//
// Author:  Hans Dietrich
//          hdietrich2@hotmail.com
//
// This software is released into the public domain.
// You are free to use it in any way you like, except
// that you may not sell this source code.
//
// This software is provided "as is" with no expressed
// or implied warranty.  I accept no liability for any
// damage or loss of business that this software may cause.
//
///////////////////////////////////////////////////////////////////////////////

#ifndef CRASHFILENAMES_H
#define CRASHFILENAMES_H

#define XCRASHREPORT_MINI_DUMP_FILE		_T("CRASH.DMP")
#define XCRASHREPORT_ERROR_LOG_FILE		_T("ERRORLOG.TXT")
#define XCRASHREPORT_REGISTRY_DUMP_FILE	_T("REGISTRY.TXT")
#define XCRASHREPORT_CRASH_REPORT_APP	_T("XCrashReport.exe")

#endif //CRASHFILENAMES_H

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
A compiler warns of bogasity, ignore it at your peril. Unless you've done the compiler's job yourself, don't criticize it.

Comments and Discussions