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.

98 lines
2.2 KiB

  1. //
  2. // Copyright 1997 - Microsoft
  3. //
  4. //
  5. // CComputr.H - Computer properties class
  6. //
  7. #ifdef INTELLIMIRROR_GROUPS
  8. #ifndef _CGROUP_H_
  9. #define _CGROUP_H_
  10. // QI Table
  11. BEGIN_QITABLE( CGroup )
  12. DEFINE_QI( IID_IShellExtInit, IShellExtInit , 1 )
  13. DEFINE_QI( IID_IShellPropSheetExt, IShellPropSheetExt, 2 )
  14. DEFINE_QI( IID_IEnumSAPs, IEnumSAPs , 4 )
  15. END_QITABLE
  16. // Definitions
  17. LPVOID
  18. CGroup_CreateInstance( void );
  19. // SAPNode Structure
  20. typedef struct __SAPNODE {
  21. LPWSTR pszServerName;
  22. BOOL fMaster;
  23. BOOL fSlave;
  24. } SAPNODE, *LPSAPNODE;
  25. // Private IEnumSAPs Interface
  26. class
  27. IEnumSAPs:
  28. public IUnknown
  29. {
  30. public:
  31. STDMETHOD(Next)( ULONG celt, LPSERVICE * rgVar, ULONG *pCeltFetched) PURE;
  32. STDMETHOD(Skip)( ULONG celt) PURE;
  33. STDMETHOD(Reset)( void) PURE;
  34. STDMETHOD(Clone)( void ** ppEnum) PURE;
  35. };
  36. // CGroup
  37. class
  38. CGroup:
  39. public IShellExtInit, IShellPropSheetExt, IEnumSAPs
  40. {
  41. private:
  42. // Enums
  43. enum {
  44. MODE_SHELL = 0,
  45. MODE_ADMIN
  46. };
  47. // IUnknown
  48. ULONG _cRef;
  49. DECLARE_QITABLE( CGroup );
  50. UINT _uMode; // Admin or Shell mode
  51. LPDATAOBJECT _pDataObj; // Data Object passed to ServerTab
  52. IEnumVARIANT * _penum; // ADSI enumerator
  53. private: // Methods
  54. CGroup();
  55. ~CGroup();
  56. STDMETHOD(Init)();
  57. public: // Methods
  58. friend LPVOID CGroup_CreateInstance( void );
  59. // IUnknown
  60. STDMETHOD(QueryInterface)( REFIID riid, LPVOID *ppv );
  61. STDMETHOD_(ULONG, AddRef)(void);
  62. STDMETHOD_(ULONG, Release)(void);
  63. // IShellExtInit
  64. STDMETHOD(Initialize)( LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj,
  65. HKEY hkeyProgID);
  66. // IShellPropSheetExt
  67. STDMETHOD(AddPages)( LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  68. STDMETHOD(ReplacePage)( UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith,
  69. LPARAM lParam);
  70. // IEnumVARIANT
  71. STDMETHOD(Next)( ULONG celt, LPSERVICE *rgVar, ULONG *pCeltFetched);
  72. STDMETHOD(Skip)( ULONG celt);
  73. STDMETHOD(Reset)( void);
  74. STDMETHOD(Clone)( void ** ppEnum);
  75. };
  76. typedef CGroup* LPGROUP;
  77. #endif // _CGROUP_H_
  78. #endif // INTELLIMIRROR_GROUPS