Click here to Skip to main content
12,352,083 members (31,984 online)
Click here to Skip to main content

Stats

179.1K views
5K downloads
113 bookmarked
Posted

A File Checksum Shell Menu Extension DLL

, 23 May 2008 LGPL3
Create a File Checksum Shell Menu Extension using ATL and Crypto++
CtxCreateHash
CtxCreateHash
CreateHash.rgs
CtxCreateHash.def
CtxCreateHash.rgs
CtxCreateHash.vcproj.8.00.old
CtxCreateHashps.def
CtxCreateHashPS.vcproj.8.00.old
CtxCreateHash.sln.old
CreateHash.rgs
CtxCreateHash.aps
CtxCreateHash.def
CtxCreateHash.rgs
CtxCreateHashps.def
CtxCreateHash.dll
CtxVerifyHash
CtxVerifyHash
CtxVerifyHash.def
CtxVerifyHash.rgs
CtxVerifyHash.vcproj.8.00.old
CtxVerifyHashps.def
CtxVerifyHashPS.vcproj.8.00.old
VerifyHash.rgs
CtxVerifyHash.sln.old
CtxVerifyHash.aps
CtxVerifyHash.def
CtxVerifyHash.rgs
CtxVerifyHashps.def
VerifyHash.rgs
CtxVerifyHash.dll
Sample 1
Test 1.dsp
Test 1.dsw
Sample 2
Test 2.dsp
Test 2.dsw
Sample 3
Test 3.dsp
Test 3.dsw
Sample 4
Test 4.dsp
Test 4.dsw
Sample 5
CtxTest.def
CtxTest.dsp
CtxTest.dsw
CtxTestps.def
CtxTestps.mk
MenuItem.rgs
#include "stdafx.h"

int main(int argc, char* argv[])
{
    int count = CountClipboardFormats();
    _tcout << count << _T(" formats available on the clipboard:") << endl << endl;  

    if( TRUE == OpenClipboard( NULL ) )
    {
        UINT format = 0;
        
        while( 0 != ( format = EnumClipboardFormats( format ) ) )
        {
            switch( format )
            {
                case CF_BITMAP:
                    _tcout << _T("  CF_BITMAP") << endl;
                    break;

                case CF_DIB:
                    _tcout << _T("  CF_DIB") << endl;
                    break;

                case CF_DIBV5:
                    _tcout << _T("  CF_DIBV5") << endl;
                    break;

                case CF_DIF:
                    _tcout << _T("  CF_DIF") << endl;
                    break;

                case CF_DSPBITMAP:
                    _tcout << _T("  CF_DSPBITMAP") << endl;
                    break;

                case CF_DSPENHMETAFILE:
                    _tcout << _T("  CF_DIB") << endl;
                    break;

                case CF_DSPMETAFILEPICT:
                    _tcout << _T("  CF_DSPMETAFILEPICT") << endl;
                    break;

                case CF_DSPTEXT:
                    _tcout << _T("  CF_DSPTEXT") << endl;
                    break;

                case CF_ENHMETAFILE:
                    _tcout << _T("  CF_ENHMETAFILE") << endl;
                    break;

                case CF_HDROP:
                    _tcout << _T("  CF_HDROP") << endl;
                    break;

                case CF_LOCALE:
                    _tcout << _T("  CF_LOCALE") << endl;
                    break;

                case CF_METAFILEPICT:
                    _tcout << _T("  CF_METAFILEPICT") << endl;
                    break;

                case CF_OEMTEXT:
                    _tcout << _T("  CF_OEMTEXT") << endl;
                    break;

                case CF_PALETTE:
                    _tcout << _T("  CF_PALETTE") << endl;
                    break;

                case CF_PENDATA:
                    _tcout << _T("  CF_PENDATA") << endl;
                    break;

                case CF_RIFF:
                    _tcout << _T("  CF_RIFF") << endl;
                    break;

                case CF_SYLK:
                    _tcout << _T("  CF_SYLK") << endl;
                    break;

                case CF_TEXT:
                    _tcout << _T("  CF_TEXT") << endl;
                    break;

                case CF_WAVE:
                    _tcout << _T("  CF_OWNERDISPLAY") << endl;
                    break;

                case CF_TIFF:
                    _tcout << _T("  CF_TIFF") << endl;
                    break;

                case CF_UNICODETEXT:
                    _tcout << _T("  CF_UNICODETEXT") << endl;
                    break;

                default:

                    if( format >= CF_GDIOBJFIRST && format <= CF_GDIOBJLAST )
                    {
                        _tcout << _T("  CF_GDIOBJFIRST + ") << format - CF_GDIOBJFIRST << endl;
                    }
                    else
                    if( format >= CF_PRIVATEFIRST && format <= CF_PRIVATELAST )
                    {
                        _tcout << _T("  CF_PRIVATEFIRST + ") << format - CF_PRIVATEFIRST << endl;
                    }
                    else
                    {
                        _tcout << _T("  Format ") << format;

                        TCHAR FormatName[ MAX_PATH + 1 ];
                        if( 0 != GetClipboardFormatName( format, FormatName, MAX_PATH ) )
                        {
                            _tcout << _T(" (") << FormatName << _T(")");
                        }

                        _tcout << endl;
                    }

                    break;
            }
        
        } // while( 0 != format );

        CloseClipboard( );
    }

    return 0;
}

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)

Share

About the Author

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

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 24 May 2008
Article Copyright 2006 by Jeffrey Walton
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid