Click here to Skip to main content
15,885,842 members
Articles / Desktop Programming / ATL

A File Checksum Shell Menu Extension DLL

Rate me:
Please Sign up or sign in to vote.
4.89/5 (34 votes)
23 May 2008LGPL315 min read 250.9K   6K   116  
Create a File Checksum Shell Menu Extension using ATL and Crypto++
// MAIN HEADER FILE FOR CProfiler CLASS
//
// A small profiling class using the Win32 API
//
// v.1.0
// Written by Hernan Di Pietro (May 2003)
// mailto:hernandp@speedy.com.ar
///////////////////////////////////////////////////
// See Profiler.cpp for implementation
//////////////////////////////////////////////////
#include <windows.h>
#ifndef __PROFILER_H__
#define __PROFILER_H__

// enumeration for Debug Logging Output Types (or "styles")
enum LOGTYPE { LOGNONE, LOGTICKS, LOGSECS, LOGALL, LOGMSGBOX };		

class CProfiler
{
public:
	
	CProfiler(void);
	~CProfiler(void);	
	void		ProfileStart(LOGTYPE logtype = LOGNONE); // starts profiling
	__int64		ProfileEnd  (char* TraceStr = "");       // end profiling										         
	double		SecsFromTicks ( __int64 ticks);
	DWORD		GetLastRetVal(void);	// returns the last error, if any.
		
private:
	
	LARGE_INTEGER	m_QPFrequency;		// ticks/sec resolution
	LARGE_INTEGER	m_StartCounter;		// start time
	LARGE_INTEGER	m_EndCounter;		// finish time
	__int64			m_ElapsedTime;		// elapsed time
	DWORD			m_Retval;			// return value for API functions
	LOGTYPE			m_LogType;			// logging type

};

#endif // __PROFILER_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 GNU Lesser General Public License (LGPLv3)


Written By
Systems / Hardware Administrator
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions