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.

97 lines
3.2 KiB

  1. // CCtl.h : Declaration of the CARPCtl
  2. #ifndef __CARPCTL_H_
  3. #define __CARPCTL_H_
  4. #include "events.h"
  5. #include "util.h"
  6. #include "mtxarray.h" // for CAppData
  7. #include "worker.h" // for IWorkerEvent
  8. // CARPCtl
  9. class ATL_NO_VTABLE CARPCtl :
  10. public CComObjectRootEx<CComSingleThreadModel>,
  11. public CComCoClass<CARPCtl, &CLSID_CARPCtl>,
  12. public IObjectWithSiteImpl<CARPCtl>,
  13. public IConnectionPointContainerImpl<CARPCtl>,
  14. public IObjectSafetyImpl<CARPCtl>,
  15. public IDispatchImpl<IARPCtl, &IID_IARPCtl, &LIBID_ARPCTLLib>,
  16. public CProxy_ARPCtlEvents<CARPCtl>,
  17. public IProvideClassInfo2Impl<&CLSID_CARPCtl, &DIID__ARPCtlEvents, &LIBID_ARPCTLLib>,
  18. public IWorkerEvent
  19. {
  20. private:
  21. DWORD _dwCurrentIndex;
  22. DWORD _dwcItems;
  23. DWORD _dwEnum; // One of ENUM_*
  24. IShellAppManager* _pam;
  25. CMtxArray2 * _pmtxarray;
  26. CWorkerThread _workerthread;
  27. BITBOOL _fSecure: 1;
  28. void _FreeAppData();
  29. CAppData * _GetAppData(DWORD iItem);
  30. public:
  31. CARPCtl();
  32. ~CARPCtl();
  33. void EnumCallback(CAppData * pcad);
  34. DECLARE_REGISTRY_RESOURCEID(IDR_CARPCTL)
  35. DECLARE_NOT_AGGREGATABLE(CARPCtl)
  36. BEGIN_COM_MAP(CARPCtl)
  37. COM_INTERFACE_ENTRY(IARPCtl)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  40. COM_INTERFACE_ENTRY_IMPL(IObjectWithSite)
  41. COM_INTERFACE_ENTRY_IMPL(IObjectSafety)
  42. COM_INTERFACE_ENTRY(IProvideClassInfo)
  43. COM_INTERFACE_ENTRY(IProvideClassInfo2)
  44. COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
  45. END_COM_MAP()
  46. BEGIN_CONNECTION_POINT_MAP(CARPCtl)
  47. CONNECTION_POINT_ENTRY(DIID__ARPCtlEvents)
  48. END_CONNECTION_POINT_MAP()
  49. // IARPCtl
  50. public:
  51. // *** IWorkerEvent methods ***
  52. STDMETHOD(FireOnDataReady) (LONG iRow);
  53. STDMETHOD(FireOnFinished) (void);
  54. STDMETHOD(get_ItemCount)(/*[out, retval]*/ long *pVal);
  55. STDMETHOD(InitData)(BSTR bstrEnum, DWORD dwSortOrder);
  56. STDMETHOD(MoveNext)(BOOL* pbool);
  57. STDMETHOD(MoveFirst)(BOOL* pbool);
  58. STDMETHOD(MoveTo)(DWORD dwRecNum, BOOL* pbool);
  59. STDMETHOD(Exec)(BSTR bstrExec);
  60. STDMETHOD(get_DisplayName)(/*[out, retval]*/ BSTR *pVal);
  61. STDMETHOD(get_Version)(/*[out, retval]*/ BSTR *pVal);
  62. STDMETHOD(get_Publisher)(/*[out, retval]*/ BSTR *pVal);
  63. STDMETHOD(get_ProductID)(/*[out, retval]*/ BSTR *pVal);
  64. STDMETHOD(get_RegisteredOwner)(/*[out, retval]*/ BSTR *pVal);
  65. STDMETHOD(get_Language)(/*[out, retval]*/ BSTR *pVal);
  66. STDMETHOD(get_SupportUrl)(/*[out, retval]*/ BSTR *pVal);
  67. STDMETHOD(get_SupportTelephone)(/*[out, retval]*/ BSTR *pVal);
  68. STDMETHOD(get_HelpLink)(/*[out, retval]*/ BSTR *pVal);
  69. STDMETHOD(get_InstallLocation)(/*[out, retval]*/ BSTR *pVal);
  70. STDMETHOD(get_InstallSource)(/*[out, retval]*/ BSTR *pVal);
  71. STDMETHOD(get_InstallDate)(/*[out, retval]*/ BSTR *pVal);
  72. STDMETHOD(get_RequiredByPolicy)(/*[out, retval]*/ BSTR *pVal);
  73. STDMETHOD(get_Contact)(/*[out, retval]*/ BSTR *pVal);
  74. STDMETHOD(get_Size)(/*[out, retval]*/ BSTR *pVal);
  75. STDMETHOD(get_TimesUsed)(/*[out, retval]*/ BSTR *pVal);
  76. STDMETHOD(get_LastUsed)(/*[out, retval]*/ BSTR *pVal);
  77. STDMETHOD(get_Capability)(/*[out, retval]*/ long *pVal);
  78. };
  79. #endif //__CARPCTL_H_