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.

88 lines
3.1 KiB

  1. //==========================================================================
  2. //
  3. // Copyright (c) 1998-2000 Microsoft Corporation.
  4. // All Rights Reserved.
  5. //
  6. // File: Detection.h :
  7. // Declaration of the CDetection class
  8. // CDetection declares COM interface IDetection
  9. //
  10. // IDetection is a class defined here without any implementation.
  11. // It defines the template that the content provider should
  12. // implement if they want to provide detection features beyong
  13. // the current detection mechanism defined in the catalog schema.
  14. //
  15. //==========================================================================
  16. #ifndef __DETECTION_H_
  17. #define __DETECTION_H_
  18. #include "resource.h" // main symbols
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CDetection
  21. class ATL_NO_VTABLE CDetection :
  22. public CComObjectRootEx<CComSingleThreadModel>,
  23. public CComCoClass<CDetection, &CLSID_Detection>,
  24. public IDispatchImpl<IDetection, &IID_IDetection, &LIBID_IUCTLLib>
  25. {
  26. public:
  27. CDetection()
  28. {
  29. }
  30. DECLARE_REGISTRY_RESOURCEID(IDR_DETECTION)
  31. DECLARE_PROTECT_FINAL_CONSTRUCT()
  32. BEGIN_COM_MAP(CDetection)
  33. COM_INTERFACE_ENTRY(IDetection)
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. END_COM_MAP()
  36. // IDetection
  37. public:
  38. STDMETHOD(Detect)(
  39. /*[in]*/ BSTR bstrXML, /* detection portion of manifest where
  40. * the COM server is called */
  41. /*[out]*/ DWORD *pdwDetectionResult /* the result of detection, see below
  42. * for interpretations */
  43. );
  44. /**
  45. //
  46. // deckare the constants used to manipulate the result of Detect() method
  47. //
  48. //
  49. // First group, used in <expression> tag, to tell the detection result. This result
  50. // should combined with other expression(s) at the same level
  51. //
  52. const DWORD IUDET_BOOL = 0x00000001; // mask
  53. const DWORD IUDET_FALSE = 0x00000000; // expression detect FALSE
  54. const DWORD IUDET_TRUE = 0x00000001; // expression detect TRUE
  55. const DWORD IUDET_NULL = 0x00000002; // expression detect data missing
  56. //
  57. // Second group, used in <detection> tag, to tell the detection result. This result
  58. // should overwrite the rest of <expression>, if any
  59. //
  60. const DWORD IUDET_INSTALLED = 0x00000010; // mask for <installed> result
  61. const DWORD IUDET_INSTALLED_NULL = 0x00000020; // <installed> missing
  62. const DWORD IUDET_UPTODATE = 0x00000040; // mask for <upToDate> result
  63. const DWORD IUDET_UPTODATE_NULL = 0x00000080; // <upToDate> missing
  64. const DWORD IUDET_NEWERVERSION = 0x00000100; // mask for <newerVersion> result
  65. const DWORD IUDET_NEWERVERSION_NULL = 0x00000200; // <newerVersion> missing
  66. const DWORD IUDET_EXCLUDED = 0x00000400; // mask for <excluded> result
  67. const DWORD IUDET_EXCLUDED_NULL = 0x00000800; // <excluded> missing
  68. const DWORD IUDET_FORCE = 0x00001000; // mask for <force> result
  69. const DWORD IUDET_FORCE_NULL = 0x00002000; // <force> missing
  70. const DWORD IUDET_COMPUTER = 0x00004000; // mask for <computerSystem> result
  71. const DWORD IUDET_COMPUTER_NULL = 0x00008000; // <computerSystem> missing
  72. **/
  73. };
  74. #endif //__DETECTION_H_