Click here to Skip to main content
12,999,628 members (58,915 online)
Click here to Skip to main content


181 bookmarked
Posted 27 May 2007

Tamper Aware and Self Healing Code

, 15 Nov 2007
Dynamically Detect Code Alterations and Repair In-Memory Executable Files Using Hashing and Crypto++
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

#include <windows.h>
#include <tchar.h>

#include <iostream>
#include <iomanip>
#include <string>

#ifdef UNICODE
#  define tcout wcout
#  define tcerr wcerr
#  define tcout cout
#  define tcerr cerr

const UINT DUMP_SIZE = 96;

#define HEXADECIMAL_OUTPUT(width) std::setw(width) << std::hex \
    << std::uppercase << std::setfill(_T('0'))

#ifdef _DEBUG
#  pragma comment( lib, "cryptlibd")
#  pragma comment( lib, "cryptlib")

// TODO: reference additional headers your program requires here

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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Jeffrey Walton
Systems / Hardware Administrator
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 15 Nov 2007
Article Copyright 2007 by Jeffrey Walton
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid