Click here to Skip to main content
15,885,366 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++
#ifndef __STDSTRING_HELPER_H_
#define __STDSTRING_HELPER_H_

#pragma warning ( push, 1 )
#include <iostream>     // cin, cout, cerr
#include <sstream>      // new and improved
#include <string>       // string
#include <locale>       // narrow to wide, wide to narrow
#include <cctype>       // toupper, tolower
#include <algorithm>    // transform
#pragma warning( pop )

#ifdef UNICODE
#  define _tcout wcout
#  define _tcerr wcerr
#  define _tcin  wcin
#  define _tclog wclog
#else
#  define _tcout cout
#  define _tcerr cerr
#  define _tcin  cin
#  define _tclog clog
#endif

#ifdef UNICODE
#  define _tstringbuf     wstringbuf
#  define _tistringstream wistringstream
#  define _tostringstream wostringstream
#else
#  define _tstringbuf     stringbuf
#  define _tistringstream istringstream
#  define _tostringstream ostringstream
#endif

#ifdef UNICODE
#  define _tstring wstring
#else
#  define _tstring string
#endif

std::wstring StringWiden( const std::string& narrow );
std::string  StringNarrow( const std::wstring& wide );

std::wstring StringUpper( const std::wstring& wide );
std::string  StringUpper( const std::string& wide );

std::wstring StringLower( const std::wstring& wide );
std::string  StringLower( const std::string& wide );

#endif // __STDSTRING_HELPER_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