Click here to Skip to main content
15,881,882 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.7K   6K   116  
Create a File Checksum Shell Menu Extension using ATL and Crypto++
#ifndef __CRYPTLIB_LIBRARY_INCLUDE__
#define __CRYPTLIB_LIBRARY_INCLUDE__

//
// This file includes the proper Crypto++ library based on
// linking against the C Runtime library. Note that
// Wei's distribution (http://www.cryptopp.com/) only
// includes a statically linked version (/MT and /MTd)
// of cryptlib. Fetch the modifed project and solution file.
// Then, unpack over top of Crypto++. See 'Alternate Configuration'
// http://www.codeproject.com/KB/tips/CryptoPPIntegration.aspx
//
// If IntelliSense or the IDE's colorizer get out of
// syncor you experiences lots of LNK2001 and LNK2019
// errors, Clean the project then perform a Build. This
// is similar to confusing the IDE when switching project
// settings (resulting in precompiled header confusion).
//
// Finally, this means nothing to a Crypto++ Dll project.
// This is for linking to the cryptlib static library only.
//
// For preprocessor define _DLL, see the following.
// * http://msdn.microsoft.com/en-us/library/b0084kay(VS.80).aspx
// * http://support.microsoft.com/kb/65472
//

// Crypto++ Library
#if defined(_DLL) && defined(_DEBUG)
#  pragma comment ( lib, "cryptlibd.dynamic.lib" )
#  pragma message("Crypto++ Library Configuration: Debug build using dynamic CRT linking.")

#elif defined(_DLL) && !defined(_DEBUG)
#  pragma comment ( lib, "cryptlib.dynamic.lib" )
#  pragma message("Crypto++ Library Configuration: Release build using dynamic CRT linking.")

#elif !defined(_DLL) && defined(_DEBUG)
#  pragma comment ( lib, "cryptlibd.static.lib" )
#  pragma message("Crypto++ Library Configuration: Debug build using static CRT linking.")

#elif !defined(_DLL) && !defined(_DEBUG)
#  pragma comment ( lib, "cryptlib.static.lib" )
#  pragma message("Crypto++ Library Configuration: Release build using static CRT linking.")

#else
#  error "Crypto++ library include panic..."

#endif

#endif // __CRYPTLIB_LIBRARY_INCLUDE__

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