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.

106 lines
2.1 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: global.h
  8. //
  9. // Contents: global include file for NTDigest security package
  10. //
  11. //
  12. // History: KDamour 15Mar00 Stolen from msv_sspi\global.h
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef NTDIGEST_GLOBAL_H
  16. #define NTDIGEST_GLOBAL_H
  17. #ifndef UNICODE
  18. #define UNICODE
  19. #endif // UNICODE
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif // __cplusplus
  24. #include <nt.h>
  25. #include <ntrtl.h>
  26. #include <nturtl.h>
  27. #include <ntlsa.h>
  28. #include <ntsam.h>
  29. #ifndef WIN32_LEAN_AND_MEAN
  30. #define WIN32_LEAN_AND_MEAN
  31. #endif // WIN32_LEAN_AND_MEAN
  32. #include <windows.h>
  33. #ifndef RPC_NO_WINDOWS_H
  34. #define RPC_NO_WINDOWS_H
  35. #endif // RPC_NO_WINDOWS_H
  36. #include <rpc.h>
  37. #ifndef SECURITY_WIN32
  38. #define SECURITY_WIN32
  39. #endif // SECURITY_WIN32
  40. #define SECURITY_PACKAGE
  41. #define SECURITY_NTLM
  42. #include <security.h>
  43. #include <secint.h>
  44. // #include <dsysdbg.h>
  45. #include <lsarpc.h>
  46. #include <lsaitf.h>
  47. #include <dns.h>
  48. #include <dnsapi.h>
  49. #include <lmcons.h>
  50. #include <md5.h>
  51. #include <hmac.h>
  52. #include <pac.hxx>
  53. // Local includes for NT Digest Access SSP
  54. #include "wdigest.h" /* Prototype functions for package */
  55. //
  56. // Macros for manipulating globals
  57. //
  58. #ifdef EXTERN
  59. #undef EXTERN
  60. #endif
  61. #ifdef NTDIGEST_GLOBAL
  62. #define EXTERN
  63. #else
  64. #define EXTERN extern
  65. #endif // NTDIGEST_GLOBAL
  66. // Copies a CzString to a String (memory alloc and copy)
  67. NTSTATUS StringCharDuplicate(
  68. OUT PSTRING DestinationString,
  69. IN OPTIONAL char *czSource);
  70. // Allocates cb bytes to STRING Buffer
  71. NTSTATUS StringAllocate(IN PSTRING pString, IN USHORT cb);
  72. // Clears a String and releases the memory
  73. NTSTATUS StringFree(IN PSTRING pString);
  74. // Allocate memory in LSA or user mode
  75. PVOID DigestAllocateMemory(IN ULONG BufferSize);
  76. // De-allocate memory from DigestAllocateMemory
  77. VOID DigestFreeMemory(IN PVOID Buffer);
  78. #ifdef __cplusplus
  79. }
  80. #endif // __cplusplus
  81. #endif // NTDIGEST_GLOBAL_H