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.

75 lines
2.3 KiB

  1. // HHFinder.h : Declaration of the CHHFinder
  2. #ifndef __HHFINDER_H__
  3. #define __HHFINDER_H__
  4. #include "header.h"
  5. #include "msitstg.h"
  6. #include "atlinc.h" // includes for ATL.
  7. // defines
  8. #define HHRMS_TYPE_TITLE 0
  9. #define HHRMS_TYPE_COMBINED_QUERY 1
  10. #define HHRMS_TYPE_ATTACHMENT 2 // a.k.a Sample
  11. // make Don's stuff work
  12. #include <stdio.h>
  13. #ifdef HHCTRL
  14. #include "parserhh.h"
  15. #else
  16. #include "parser.h"
  17. #endif
  18. #include "collect.h"
  19. #include "hhtypes.h"
  20. #include "toc.h"
  21. #define HHFINDER_VERSION 1
  22. #define HHFINDER_VERSION_ID_STR "HHCtrl.FileFinder.1"
  23. #define HHFINDER_ID_STR "HHCtrl.FileFinder"
  24. #define HHFINDER_GUID "{adb880a4-d8ff-11cf-9377-00aa003b7a11}"
  25. #define HHFINDER_EXTENSION ".chm"
  26. // success codes
  27. #define HHRMS_S_LOCATION_UPDATE MAKE_HRESULT(SEVERITY_SUCCESS,FACILITY_ITF,100)
  28. // error codes
  29. #define HHRMS_E_SKIP MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,100)
  30. #define HHRMS_E_SKIP_ALWAYS MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,101)
  31. // Interface ID for the File Finder interface (used with URLs):
  32. // "adb880a4-d8ff-11cf-9377-00aa003b7a11";
  33. DEFINE_GUID( CLSID_HHFinder,
  34. 0xadb880a4, 0xd8ff, 0x11cf, 0x93, 0x77, 0x00, 0xaa, 0x00, 0x3b, 0x7a, 0x11);
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CHHFinder
  37. class ATL_NO_VTABLE CHHFinder :
  38. public IITFileFinder,
  39. public CComObjectRootEx<CComMultiThreadModel>,
  40. public CComCoClass<CHHFinder, &CLSID_HHFinder>
  41. {
  42. public:
  43. CHHFinder() {}
  44. DECLARE_REGISTRY( CLSID_HHFinder, HHFINDER_VERSION_ID_STR, HHFINDER_ID_STR, 0, THREADFLAGS_BOTH )
  45. BEGIN_COM_MAP(CHHFinder)
  46. COM_INTERFACE_ENTRY(IITFileFinder)
  47. END_COM_MAP()
  48. public:
  49. HRESULT STDMETHODCALLTYPE FindThisFile(const WCHAR* pwszFileName,
  50. WCHAR** ppwszPathName, BOOL* pfRecordPathInRegistry );
  51. };
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CD Swap Dialog
  54. HRESULT EnsureStorageAvailability( CExTitle* pTitle,
  55. UINT uiFileType = HHRMS_TYPE_TITLE,
  56. BOOL bVolumeCheck = TRUE,
  57. BOOL bAlwaysPrompt = TRUE,
  58. BOOL bNeverPrompt = FALSE );
  59. #endif //__HHFINDER_H__