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.

126 lines
2.4 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: ntlmutil.h
  8. //
  9. // Contents: prototypes for NtLm utility functions
  10. //
  11. //
  12. // History: ChandanS 25-Jul-1996 Stolen from kerberos\client2\kerbutil.h
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __NTLMUTIL_H__
  16. #define __NTLMUTIL_H__
  17. #include <malloc.h>
  18. ///////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // Miscellaneous macros //
  21. // //
  22. ///////////////////////////////////////////////////////////////////////////////
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. NTSTATUS
  28. NtLmDuplicateUnicodeString(
  29. OUT PUNICODE_STRING DestinationString,
  30. IN OPTIONAL PUNICODE_STRING SourceString
  31. );
  32. NTSTATUS
  33. NtLmDuplicateString(
  34. OUT PSTRING DestinationString,
  35. IN OPTIONAL PSTRING SourceString
  36. );
  37. NTSTATUS
  38. NtLmDuplicatePassword(
  39. OUT PUNICODE_STRING DestinationString,
  40. IN OPTIONAL PUNICODE_STRING SourceString
  41. );
  42. NTSTATUS
  43. NtLmDuplicateSid(
  44. OUT PSID *DestinationSid,
  45. IN PSID SourceSid
  46. );
  47. VOID
  48. NtLmFree(
  49. IN PVOID Buffer
  50. );
  51. PVOID
  52. NtLmAllocate(
  53. IN SIZE_T BufferSize
  54. );
  55. PVOID
  56. NtLmAllocateLsaHeap(
  57. IN ULONG BufferSize
  58. );
  59. VOID
  60. NtLmFreeLsaHeap(
  61. IN PVOID Buffer
  62. );
  63. //
  64. // internal versions for use when code only executed in LSA.
  65. //
  66. #if DBG
  67. PVOID
  68. NtLmAllocatePrivateHeap(
  69. IN SIZE_T BufferSize
  70. );
  71. VOID
  72. NtLmFreePrivateHeap(
  73. IN PVOID Buffer
  74. );
  75. PVOID
  76. I_NtLmAllocate(
  77. IN SIZE_T BufferSize
  78. );
  79. VOID
  80. I_NtLmFree(
  81. IN PVOID Buffer
  82. );
  83. #else
  84. //
  85. // routines that use LsaHeap - necessary for buffers which
  86. // LSA frees outside of package from LsaHeap
  87. //
  88. //
  89. // routines that use LsaPrivateHeap.
  90. //
  91. #define NtLmAllocatePrivateHeap(x) LsaFunctions->AllocatePrivateHeap(x)
  92. #define NtLmFreePrivateHeap(x) LsaFunctions->FreePrivateHeap(x)
  93. #define I_NtLmAllocate(x) Lsa.AllocatePrivateHeap(x)
  94. #define I_NtLmFree(x) Lsa.FreePrivateHeap(x)
  95. #endif
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif // __NTLMUTIL_H__