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.

113 lines
2.9 KiB

  1. /*+
  2. * FileName: delegation.h
  3. * Author: RuiM
  4. * Copyright (c) 1998 Microsoft Corp.
  5. *
  6. * Description:
  7. * Simple API to either turn on or off a computer's
  8. * delegation trust flag through ldap.
  9. -*/
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. BOOL
  14. TrustComputerForDelegationW(
  15. IN LPWSTR lpComputerName,
  16. IN BOOL OnOff
  17. );
  18. BOOL
  19. TrustComputerForDelegationA(
  20. IN LPSTR lpComputerName,
  21. IN BOOL OnOff
  22. );
  23. /*++
  24. Routine Description:
  25. This API turns on or off the computer
  26. delegation trust value in the domain.
  27. The computer name is passed in, and the
  28. operation is performed through the ldap
  29. provider.
  30. Arguments:
  31. lpComputerName - computer name to turn on
  32. off the delegation trust.
  33. OnOff - boolean to specify whether to turn
  34. on or off the delegation trust.
  35. Return Value:
  36. TRUE if the operation succeeded,
  37. FALSE otherwise.
  38. --*/
  39. #ifdef LDAP_CLIENT_DEFINED /* need to have included <winldap.h>
  40. to use these related functions--
  41. these are underlying functions for
  42. the delegation trust. */
  43. BOOL
  44. SetAccountControlFlagsA( IN OPTIONAL PLDAP pLdap,
  45. IN OPTIONAL LPSTR DomainName,
  46. IN LPSTR SamAccountName,
  47. IN ULONG AccountControlFlags );
  48. BOOL
  49. SetAccountControlFlagsW( IN OPTIONAL PLDAP pLdap,
  50. IN OPTIONAL LPWSTR DomainName,
  51. IN LPWSTR SamAccountName,
  52. IN ULONG AccountControlFlags );
  53. BOOL
  54. QueryAccountControlFlagsA( IN OPTIONAL PLDAP pLdap,
  55. IN OPTIONAL LPSTR DomainName, // ignored
  56. IN LPSTR SamAccountName,
  57. OUT PULONG pulControlFlags );
  58. BOOL
  59. QueryAccountControlFlagsW( IN OPTIONAL PLDAP pLdap,
  60. IN OPTIONAL LPWSTR DomainName, // ignored
  61. IN LPWSTR SamAccountName,
  62. OUT PULONG pulControlFlags );
  63. BOOL
  64. LdapQueryUlongAttributeA( IN OPTIONAL PLDAP pLdap,
  65. IN OPTIONAL LPSTR DomainName, // ignored
  66. IN LPSTR SamAccountName,
  67. IN LPSTR AttributeName,
  68. OUT PULONG pulAttributeContents );
  69. BOOL
  70. LdapQueryUlongAttributeW( IN OPTIONAL PLDAP pLdap,
  71. IN OPTIONAL LPWSTR DomainName, // ignored
  72. IN LPWSTR SamAccountName,
  73. IN LPWSTR AttributeName,
  74. OUT PULONG pulAttributeContents );
  75. #endif
  76. #ifdef UNICODE
  77. #define QueryAccountControlFlags QueryAccountControlFlagsW
  78. #define SetAccountControlFlags SetAccountControlFlagsW
  79. #define TrustComputerForDelegation TrustComputerForDelegationW
  80. #define LdapQueryUlongAttribute LdapQueryUlongAttributeW
  81. #else // ANSI
  82. #define QueryAccountControlFlags QueryAccountControlFlagsA
  83. #define SetAccountControlFlags SetAccountControlFlagsA
  84. #define TrustComputerForDelegation TrustComputerForDelegationA
  85. #define LdapQueryUlongAttribute LdapQueryUlongAttributeA
  86. #endif
  87. #ifdef __cplusplus
  88. }
  89. #endif