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.

132 lines
2.5 KiB

  1. class CLDAPGroup;
  2. class CLDAPGroup : INHERIT_TRACKING,
  3. public IADsGroup,
  4. public IPrivateUnknown,
  5. public IPrivateDispatch,
  6. public IADsExtension,
  7. public INonDelegatingUnknown
  8. {
  9. public:
  10. /* IUnknown methods */
  11. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  12. DECLARE_DELEGATING_REFCOUNTING
  13. //
  14. // INonDelegatingUnkown methods declaration for NG_QI, definition for
  15. // NG_AddRef adn NG_Release.
  16. //
  17. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  18. const IID&,
  19. void **
  20. );
  21. DECLARE_NON_DELEGATING_REFCOUNTING
  22. DECLARE_IDispatch_METHODS
  23. DECLARE_IPrivateUnknown_METHODS
  24. DECLARE_IPrivateDispatch_METHODS
  25. STDMETHOD(Operate)(
  26. THIS_
  27. DWORD dwCode,
  28. VARIANT varUserName,
  29. VARIANT varPassword,
  30. VARIANT varReserved
  31. );
  32. STDMETHOD(PrivateGetIDsOfNames)(
  33. THIS_
  34. REFIID riid,
  35. OLECHAR FAR* FAR* rgszNames,
  36. unsigned int cNames,
  37. LCID lcid,
  38. DISPID FAR* rgdispid) ;
  39. STDMETHOD(PrivateInvoke)(
  40. THIS_
  41. DISPID dispidMember,
  42. REFIID riid,
  43. LCID lcid,
  44. WORD wFlags,
  45. DISPPARAMS FAR* pdispparams,
  46. VARIANT FAR* pvarResult,
  47. EXCEPINFO FAR* pexcepinfo,
  48. unsigned int FAR* puArgErr
  49. ) ;
  50. DECLARE_IADs_METHODS
  51. DECLARE_IADsGroup_METHODS
  52. CLDAPGroup::CLDAPGroup();
  53. CLDAPGroup::~CLDAPGroup();
  54. static
  55. HRESULT
  56. CLDAPGroup::CreateGroup(
  57. IUnknown *pUnkOuter,
  58. REFIID riid,
  59. void **ppvObj
  60. );
  61. HRESULT
  62. CLDAPGroup::ModifyGroup(
  63. BSTR bstrItem,
  64. BOOL fAdd
  65. );
  66. HRESULT
  67. CLDAPGroup::IsMemberOnAD(
  68. THIS_ BSTR bstrMember,
  69. VARIANT_BOOL FAR * bMember
  70. );
  71. HRESULT
  72. CLDAPGroup::IsMemberOnOther(
  73. THIS_ BSTR bstrMember,
  74. VARIANT_BOOL FAR * bMember
  75. );
  76. protected:
  77. IADs FAR * _pADs;
  78. CCredentials _Credentials;
  79. CAggregateeDispMgr FAR * _pDispMgr;
  80. BOOL _fDispInitialized;
  81. DWORD _dwServerType;
  82. private:
  83. HRESULT
  84. InitCredentials(
  85. VARIANT * pvarUserName,
  86. VARIANT * pvarPassword,
  87. VARIANT * pdwAuthFlags
  88. );
  89. //
  90. // Update the server type from unknown to either
  91. // AD or not AD.
  92. //
  93. HRESULT
  94. UpdateServerType();
  95. };