windows-nt/Source/XPSP1/NT/shell/themes/inc/themefile.h

42 lines
1.3 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
//---------------------------------------------------------------------------
// ThemeFile.h - manages loaded theme files
//---------------------------------------------------------------------------
#pragma once
//---------------------------------------------------------------------------
class CUxThemeFile // changed from "CThemeFile" to avoid conflict with
{ // class of same name in themeui
//---- methods ----
public:
CUxThemeFile();
~CUxThemeFile();
HRESULT CreateFile(int iLength, BOOL fReserve = FALSE);
HRESULT CreateFromSection(HANDLE hSection);
HRESULT OpenFromHandle(HANDLE handle, BOOL fCleanupOnFailure = FALSE);
HRESULT ValidateThemeData(BOOL fFullCheck);
bool IsReady();
bool IsGlobal();
bool HasStockObjects();
HANDLE Handle()
{
if (this)
return _hMemoryMap;
return NULL;
}
DWORD DataCheckSum();
void CloseFile();
void Reset();
HANDLE Unload();
BOOL ValidateObj();
//---- data ----
char _szHead[8];
BYTE *_pbThemeData; // ptr to shared memory block
HANDLE _hMemoryMap; // handle to memory mapped file
char _szTail[4];
};
//---------------------------------------------------------------------------