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.

84 lines
1.9 KiB

  1. //
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-2001
  5. //
  6. // Author: AdamEd
  7. // Date: January 2000
  8. //
  9. // Abstractions for directory service layer
  10. //
  11. //
  12. //---------------------------------------------------------------------
  13. #if !defined(_DSAPI_HXX_)
  14. #define _DSAPI_HXX_
  15. //*************************************************************
  16. //
  17. // class CServerContext
  18. //
  19. // Purpose: Stores server name and credentials for
  20. // accessing the server
  21. //
  22. //
  23. // Notes: This class should only be used in short-lived
  24. // administrative command line tools since it
  25. // stores credentials -- a different solution
  26. // should be used if alternative credentials
  27. // are to be used in a service or a tool that
  28. // involves some amount of user input
  29. //
  30. //*************************************************************
  31. class CServerContext
  32. {
  33. public:
  34. CServerContext();
  35. ~CServerContext();
  36. HRESULT
  37. Initialize(
  38. WCHAR* wszServerName );
  39. HRESULT
  40. Initialize(
  41. CServerContext* pServerContext );
  42. BOOL
  43. Compare( CServerContext* pServerContext );
  44. WCHAR*
  45. GetServerName();
  46. private:
  47. WCHAR* _wszServerName;
  48. };
  49. HRESULT
  50. DSGetAndValidateColumn(
  51. HANDLE hDSObject,
  52. ADS_SEARCH_HANDLE hSearchHandle,
  53. ADSTYPE ADsType,
  54. LPWSTR pszColumnName,
  55. PADS_SEARCH_COLUMN pColumn
  56. );
  57. HRESULT DSAccessCheck(
  58. PSECURITY_DESCRIPTOR pSD,
  59. PRSOPTOKEN pRsopUserToken,
  60. BOOL* pbAccessAllowed
  61. );
  62. HRESULT
  63. DSServerOpenDSObject(
  64. CServerContext* pServerContext,
  65. LPWSTR pszDNName,
  66. LONG lFlags,
  67. PHANDLE phDSObject
  68. );
  69. #endif // _DSAPI_HXX_