Leaked source code of windows server 2003
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.

40 lines
1.3 KiB

  1. //---------------------------------------------------------------------------
  2. // ThemeFile.h - manages loaded theme files
  3. //---------------------------------------------------------------------------
  4. #pragma once
  5. //---------------------------------------------------------------------------
  6. class CUxThemeFile // changed from "CThemeFile" to avoid conflict with
  7. { // class of same name in themeui
  8. //---- methods ----
  9. public:
  10. CUxThemeFile();
  11. ~CUxThemeFile();
  12. HRESULT CreateFile(int iLength, BOOL fReserve = FALSE);
  13. HRESULT CreateFromSection(HANDLE hSection);
  14. HRESULT OpenFromHandle(HANDLE handle, DWORD dwDesiredAccess = FILE_MAP_READ, BOOL fCleanupOnFailure = FALSE);
  15. HRESULT ValidateThemeData(BOOL fFullCheck);
  16. bool IsReady();
  17. bool IsGlobal();
  18. bool HasStockObjects();
  19. HANDLE Handle()
  20. {
  21. if (this)
  22. return _hMemoryMap;
  23. return NULL;
  24. }
  25. void CloseFile();
  26. void Reset();
  27. HANDLE Unload();
  28. BOOL ValidateObj();
  29. //---- data ----
  30. char _szHead[8];
  31. BYTE *_pbThemeData; // ptr to shared memory block
  32. HANDLE _hMemoryMap; // handle to memory mapped file
  33. char _szTail[4];
  34. };
  35. //---------------------------------------------------------------------------