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.

73 lines
2.1 KiB

  1. // FileAndAction.h : Declaration of the CFileAndAction
  2. #pragma once
  3. #include "resource.h" // main symbols
  4. #include "atlcomcli.h"
  5. // IFileAndAction
  6. [
  7. object,
  8. uuid("FBBD73B0-471E-475D-BB10-09A012571FA9"),
  9. dual, helpstring("IFileAndAction Interface"),
  10. pointer_default(unique)
  11. ]
  12. __interface IFileAndAction : IDispatch
  13. {
  14. [propget, id(1), helpstring("property Filename")] HRESULT Filename([out, retval] BSTR* pVal);
  15. [propput, id(1), helpstring("property Filename")] HRESULT Filename([in] BSTR newVal);
  16. [propget, id(2), helpstring("property Action. Examples of valid actions are Add, Delete, Edit, and Integrate.")] HRESULT Action([out, retval] BSTR* pVal);
  17. [propput, id(2), helpstring("property Action. Examples of valid actions are Add, Delete, Edit, and Integrate.")] HRESULT Action([in] BSTR newVal);
  18. [propget, id(3), helpstring("property Enabled. This controls whether the corresponding file and action will be present in the saved changelist.")] HRESULT Enabled([out, retval] BOOL* pVal);
  19. [propput, id(3), helpstring("property Enabled. This controls whether the corresponding file and action will be present in the saved changelist.")] HRESULT Enabled([in] BOOL newVal);
  20. };
  21. // CFileAndAction
  22. [
  23. coclass,
  24. threading("apartment"),
  25. vi_progid("WebChange.FileAndAction"),
  26. progid("WebChange.FileAndAction"),
  27. version(1.3),
  28. uuid("A7DDB946-91A9-467F-A00B-CD7397387E4A"),
  29. helpstring("FileAndAction Class")
  30. ]
  31. class ATL_NO_VTABLE CFileAndAction :
  32. public IFileAndAction,
  33. public IObjectSafetyImpl<CFileAndAction,
  34. INTERFACESAFE_FOR_UNTRUSTED_CALLER |
  35. INTERFACESAFE_FOR_UNTRUSTED_DATA>
  36. {
  37. public:
  38. CFileAndAction()
  39. : m_fEnabled(TRUE)
  40. {
  41. }
  42. DECLARE_PROTECT_FINAL_CONSTRUCT()
  43. HRESULT FinalConstruct()
  44. {
  45. return S_OK;
  46. }
  47. void FinalRelease()
  48. {
  49. }
  50. STDMETHOD(get_Filename)(BSTR* pVal);
  51. STDMETHOD(put_Filename)(BSTR newVal);
  52. STDMETHOD(get_Action)(BSTR* pVal);
  53. STDMETHOD(put_Action)(BSTR newVal);
  54. STDMETHOD(get_Enabled)(BOOL* pVal);
  55. STDMETHOD(put_Enabled)(BOOL newVal);
  56. private:
  57. CComBSTR m_Filename;
  58. CComBSTR m_Action;
  59. BOOL m_fEnabled;
  60. };