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.

142 lines
2.7 KiB

  1. class CLDAPUser;
  2. //
  3. // Structure definition for list used to track servers support
  4. // for SSL to speedup Set/ChangePassword
  5. //
  6. typedef struct _ServSSLEntry
  7. {
  8. LPWSTR pszServerName;
  9. DWORD dwFlags;
  10. struct _ServSSLEntry *pNext;
  11. } SERVSSLENTRY, *PSERVSSLENTRY;
  12. //
  13. // These are bit masks
  14. //
  15. #define SERVER_STATUS_UNKNOWN 0x0
  16. #define SERVER_DOES_NOT_SUPPORT_SSL 0x1
  17. #define SERVER_DOES_NOT_SUPPORT_KERBEROS 0x2
  18. #define SERVER_DOES_NOT_SUPPORT_NETUSER 0x4
  19. //
  20. // Routines to Access/Manipulate and delete the list
  21. //
  22. DWORD ReadServerSupportsSSL( LPWSTR pszServerName);
  23. HRESULT AddServerSSLSupportStatus(
  24. LPWSTR pszServerName,
  25. DWORD dwFlags
  26. );
  27. void FreeServerSSLSupportList();
  28. class CLDAPUser : INHERIT_TRACKING,
  29. public IADsUser,
  30. public IPrivateUnknown,
  31. public IPrivateDispatch,
  32. public IADsExtension,
  33. public INonDelegatingUnknown
  34. {
  35. public:
  36. //
  37. // IUnknown methods
  38. //
  39. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  40. DECLARE_DELEGATING_REFCOUNTING
  41. //
  42. // INonDelegatingUnkown methods declaration for NG_QI, definition for
  43. // NG_AddRef adn NG_Release.
  44. //
  45. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  46. const IID&,
  47. void **
  48. );
  49. DECLARE_NON_DELEGATING_REFCOUNTING
  50. DECLARE_IDispatch_METHODS
  51. DECLARE_IPrivateUnknown_METHODS
  52. DECLARE_IPrivateDispatch_METHODS
  53. STDMETHOD(Operate)(
  54. THIS_
  55. DWORD dwCode,
  56. VARIANT varUserName,
  57. VARIANT varPassword,
  58. VARIANT varReserved
  59. );
  60. STDMETHOD(PrivateGetIDsOfNames)(
  61. THIS_
  62. REFIID riid,
  63. OLECHAR FAR* FAR* rgszNames,
  64. unsigned int cNames,
  65. LCID lcid,
  66. DISPID FAR* rgdispid) ;
  67. STDMETHOD(PrivateInvoke)(
  68. THIS_
  69. DISPID dispidMember,
  70. REFIID riid,
  71. LCID lcid,
  72. WORD wFlags,
  73. DISPPARAMS FAR* pdispparams,
  74. VARIANT FAR* pvarResult,
  75. EXCEPINFO FAR* pexcepinfo,
  76. unsigned int FAR* puArgErr
  77. ) ;
  78. DECLARE_IADs_METHODS
  79. DECLARE_IADsUser_METHODS
  80. CLDAPUser::CLDAPUser();
  81. CLDAPUser::~CLDAPUser();
  82. static
  83. HRESULT
  84. CLDAPUser::CreateUser(
  85. IUnknown *pUnkOuter,
  86. REFIID riid,
  87. void **ppvObj
  88. );
  89. protected:
  90. IADs * _pADs;
  91. CAggregateeDispMgr FAR * _pDispMgr;
  92. CCredentials _Credentials;
  93. BOOL _fDispInitialized;
  94. private:
  95. HRESULT
  96. InitCredentials(
  97. VARIANT * pvarUserName,
  98. VARIANT * pvarPassword,
  99. VARIANT * pdwAuthFlags
  100. );
  101. };