Return to 32 Bit CRC File Calculation
// CRCfileDlg.h : header file
//
// Copyright © 2000 - 2008 Richard A. Ellingson
// http://www.createwindow.com
// mailto:CreateWindow.com@comcast.net

#if !defined(AFX_CRCFILEDLG_H__E2171666_C9AF_11D3_96B1_00A0CC52C86A__INCLUDED_)
#define AFX_CRCFILEDLG_H__E2171666_C9AF_11D3_96B1_00A0CC52C86A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CCRCfileDlg dialog

class CCRCfileDlg : public CDialog
{
// Construction
public:
     CCRCfileDlg(CWnd* pParent = NULL);     // standard constructor

// Dialog Data
     //{{AFX_DATA(CCRCfileDlg)
     enum { IDD = IDD_CRCFILE_DIALOG };
     CString     m_csCRCtext;
     CString     m_csFileName;
     CString     m_csURL;
     //}}AFX_DATA

     // ClassWizard generated virtual function overrides
     //{{AFX_VIRTUAL(CCRCfileDlg)
     protected:
     virtual void DoDataExchange(CDataExchange* pDX);     // DDX/DDV support
     //}}AFX_VIRTUAL

// Implementation
protected:
// ******* Begin custom code *******

     ULONG crc32_table[256]; // Lookup table array
     void Init_CRC32_Table(); // Builds Lookup table array
     ULONG Reflect(ULONG ref, char ch); // Reflects CRC bits in the lookup table
     void Open_File(); // Opens the file and reads it
     int Get_CRC(CString& csData, DWORD dwSize); // Creates a CRC from a string buffer

// ******* End custom code *******
     HICON m_hIcon;

     // Generated message map functions
     //{{AFX_MSG(CCRCfileDlg)
     virtual BOOL OnInitDialog();
     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
     afx_msg void OnPaint();
     afx_msg HCURSOR OnQueryDragIcon();
     virtual void OnCancel();
     afx_msg void OnOpen();
     afx_msg void OnDropFiles(HDROP hDropInfo);
     //}}AFX_MSG
     DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CRCFILEDLG_H__E2171666_C9AF_11D3_96B1_00A0CC52C86A__INCLUDED_)