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.

87 lines
3.0 KiB

  1. // DSdirect.h : Declaration of ds routines and clases
  2. //
  3. //+-------------------------------------------------------------------------
  4. //
  5. // Microsoft Windows
  6. // Copyright (C) Microsoft Corporation, 1992 - 1999
  7. //
  8. // File: DSdirect.h
  9. //
  10. // Contents: Encapsulation for ADsi interfaces and methods
  11. //
  12. // History: 02-feb-97 jimharr Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef __DSDIRECT_H_
  16. #define __DSDIRECT_H_
  17. class CDSDirect;
  18. class CDSCookie;
  19. class CDSUINode;
  20. class CDSComponentData;
  21. class CDSThreadQueryInfo;
  22. class CWorkerThread;
  23. class CDSDirect
  24. {
  25. public:
  26. CDSDirect();
  27. CDSDirect(CDSComponentData * pCD);
  28. ~CDSDirect();
  29. CString m_strDNS;
  30. CDSComponentData * m_pCD;
  31. HRESULT EnumerateContainer(CDSThreadQueryInfo* pQueryInfo,
  32. CWorkerThread* pWorkerThread);
  33. HRESULT EnumerateRootContainer(CDSThreadQueryInfo* pQueryInfo,
  34. CWorkerThread* pWorkerThread);
  35. HRESULT CreateRootChild(LPCTSTR lpcszPrefix,
  36. CDSThreadQueryInfo* pQueryInfo,
  37. CWorkerThread* pWorkerThread);
  38. HRESULT DeleteObject(CDSCookie *pCookie, BOOL raiseUI);
  39. HRESULT MoveObject(CDSCookie *pCookie);
  40. HRESULT RenameObject(CDSCookie *pCookie, LPCWSTR lpszBaseDN);
  41. HRESULT DSFind(HWND hwnd, LPCWSTR lpszBaseDN);
  42. HRESULT GetParentDN(CDSCookie* pCookie, CString& szParentDN);
  43. HRESULT InitCreateInfo();
  44. HRESULT ReadDSObjectCookie(IN CDSUINode* pContainerDSUINode, // IN: container where to create object
  45. IN LPCWSTR lpszLdapPath, // path of the object
  46. OUT CDSCookie** ppNewCookie); // newly created cookie
  47. HRESULT ReadDSObjectCookie(IN CDSUINode* pContainerDSUINode, // IN: container where to create object
  48. IN IADs* pADs, // pointer to an already bound ADSI object
  49. OUT CDSCookie** ppNewCookie); // newly created cookie
  50. HRESULT CreateDSObject(CDSUINode* pContainerDSUINode, // IN: container where to create object
  51. LPCWSTR lpszObjectClass, // IN: class of the object to be created
  52. IN CDSUINode* pCopyFromDSUINode, // IN: (optional) object to be copied
  53. OUT CDSCookie** ppSUINodeNew); // OUT: OPTIONAL: Pointer to new node
  54. };
  55. //////////////////////////////////////////////////////////////////////////////////
  56. // standard attributes array (for queries)
  57. extern const INT g_nStdCols; // number of items in the standard attributes array
  58. extern const LPWSTR g_pStandardAttributes[]; // array if attrbutes
  59. // indexes in the array
  60. extern const INT g_nADsPath;
  61. extern const INT g_nName;
  62. extern const INT g_nObjectClass;
  63. extern const INT g_nGroupType;
  64. extern const INT g_nDescription;
  65. extern const INT g_nUserAccountControl;
  66. extern const INT g_nSystemFlags;
  67. ///////////////////////////////////////////////////////////////////////////////////
  68. #endif __DSDIRECT_H_