Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. CheckBmp.h
  5. Abstract:
  6. BMP file format checking routines
  7. Author:
  8. Hakki T. Bostanci (hakkib) 06-Apr-2000
  9. Revision History:
  10. --*/
  11. #ifndef _CHECKBMP_H_
  12. #define _CHECKBMP_H_
  13. class CCheckBmp
  14. {
  15. public:
  16. BOOL Check(PVOID pDIB, DWORD dwDIBSize, BOOL bSkipFileHeader);
  17. private:
  18. BOOL CheckFileHeader();
  19. BOOL CheckBitmapInfo();
  20. BOOL CheckBitmapCoreHeader();
  21. BOOL CheckBitmapInfoHeader();
  22. BOOL CheckBitmapV4Header();
  23. BOOL CheckBitmapV5Header();
  24. BOOL CheckPalette();
  25. BOOL CheckPixelData();
  26. private:
  27. PVOID m_pDIB;
  28. DWORD m_nDIBSize;
  29. PVOID m_pFileHeader;
  30. DWORD m_nFileHeaderSize;
  31. PVOID m_pInfoHeader;
  32. DWORD m_nInfoHeaderSize;
  33. PVOID m_pPalette;
  34. DWORD m_nPaletteSize;
  35. PVOID m_pProfile;
  36. DWORD m_nProfileSize;
  37. PVOID m_pPixelData;
  38. DWORD m_nPixelDataSize;
  39. };
  40. BOOL CheckBmp(PVOID pDIB, DWORD dwDIBSize, BOOL bSkipFileHeader);
  41. BOOL CheckBmp(PCTSTR pszFileName);
  42. #endif //_CHECKBMP_H_