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.

61 lines
1.9 KiB

  1. #ifndef _util_h_
  2. #define _util_h_
  3. #include <windows.h>
  4. #include <fs.h>
  5. typedef unsigned long HASH;
  6. PCSTR FindFilePortion(PCSTR pszFile);
  7. void reportOleError(HRESULT hr);
  8. PSTR StrChr(PCSTR pszString, char ch);
  9. PSTR StrRChr(PCSTR pszString, char ch);
  10. HASH WINAPI HashFromSz(PCSTR pszKey);
  11. // WARNING: Never, ever change the order of these enums or you break
  12. // backwards compatibility
  13. typedef enum {
  14. TAG_DEFAULT_TOC, // needed if no window definitions
  15. TAG_DEFAULT_INDEX, // needed if no window definitions
  16. TAG_DEFAULT_HTML, // needed if no window definitions
  17. TAG_DEFAULT_CAPTION, // needed if no window definitions
  18. TAG_SYSTEM_FLAGS,
  19. TAG_DEFAULT_WINDOW,
  20. TAG_SHORT_NAME, // short name of title (ex. root filename)
  21. TAG_HASH_BINARY_INDEX,
  22. TAG_INFO_TYPES,
  23. TAG_COMPILER_VERSION, // specifies the version of the compiler used
  24. TAG_TIME, // the time the file was compiled
  25. TAG_HASH_BINARY_TOC, // binary TOC
  26. TAG_INFOTYPE_COUNT, // Total number if infotypes found in .chm
  27. TAG_IDXHEADER, // Much of this is duplicate, used to live in it's own subile.
  28. TAG_EXT_TABS, // extensible tabs
  29. TAG_INFO_TYPE_CHECKSUM,
  30. TAG_DEFAULT_FONT, // font to use in all CHM-supplied UI
  31. TAG_NEVER_PROMPT_ON_MERGE, // never prompt during index merge
  32. } SYSTEM_TAG_TYPE;
  33. typedef struct {
  34. WORD tag;
  35. WORD cbTag;
  36. } SYSTEM_TAG;
  37. class CTitleInformation
  38. {
  39. public:
  40. CTitleInformation( CFileSystem* pFileSystem );
  41. ~CTitleInformation();
  42. HRESULT Initialize();
  43. inline PCSTR GetShortName() {return m_pszShortName; }
  44. inline PCSTR GetDefaultCaption() {return m_pszDefCaption; }
  45. private:
  46. CFileSystem* m_pFileSystem; // title file system handle
  47. PCSTR m_pszShortName; // short title name
  48. PCSTR m_pszDefCaption;
  49. };
  50. #endif