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.

69 lines
1.9 KiB

  1. // FilesAndActions.h : Declaration of the CFilesAndActions
  2. #pragma once
  3. #include "resource.h" // main symbols
  4. #include <list>
  5. // IFilesAndActions
  6. [
  7. object,
  8. uuid("14AD0A5D-16AD-4C3F-A56D-A2F4FE7458F9"),
  9. dual, helpstring("IFilesAndActions Interface"),
  10. pointer_default(unique)
  11. ]
  12. __interface IFilesAndActions : IDispatch
  13. {
  14. [propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item([in] long Index, [out, retval] VARIANT* pVal);
  15. [propget, id(DISPID_NEWENUM), helpstring("property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN* pVal);
  16. [propget, id(1), helpstring("property Count")] HRESULT Count([out, retval] long* pVal);
  17. [id(2), helpstring("method Add. The new item is added to the end of the collection.")] HRESULT Add([in] VARIANT NewItem);
  18. [id(3), helpstring("method Remove. Specify the index of the item to remove.")] HRESULT Remove([in] long Index);
  19. };
  20. // CFilesAndActions
  21. // typdefs to make life easier.
  22. typedef std::list<CComVariant> StdVariantList;
  23. typedef CComEnumOnSTL<IEnumVARIANT, &IID_IEnumVARIANT, VARIANT, _Copy<VARIANT>, StdVariantList> STLVariantEnum;
  24. typedef ICollectionOnSTLImpl<IFilesAndActions, StdVariantList, VARIANT, _Copy<VARIANT>, STLVariantEnum> VariantCollImpl;
  25. [
  26. coclass,
  27. threading("apartment"),
  28. vi_progid("WebChange.FilesAndActions"),
  29. progid("WebChange.FilesAndActions"),
  30. version(1.3),
  31. uuid("9819D968-C9A8-4528-BB0D-4AF0A8EDDBD8"),
  32. helpstring("FilesAndActions Class")
  33. ]
  34. class ATL_NO_VTABLE CFilesAndActions :
  35. public IDispatchImpl<VariantCollImpl, &__uuidof(IFilesAndActions)>,
  36. public IObjectSafetyImpl<CFilesAndActions,
  37. INTERFACESAFE_FOR_UNTRUSTED_CALLER |
  38. INTERFACESAFE_FOR_UNTRUSTED_DATA>
  39. {
  40. public:
  41. CFilesAndActions()
  42. {
  43. }
  44. DECLARE_PROTECT_FINAL_CONSTRUCT()
  45. HRESULT FinalConstruct()
  46. {
  47. return S_OK;
  48. }
  49. void FinalRelease()
  50. {
  51. }
  52. public:
  53. STDMETHOD(Add)(VARIANT Item);
  54. STDMETHOD(Remove)(long Index);
  55. };