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.

87 lines
1.9 KiB

  1. #ifndef UNICODE
  2. #define UNICODE
  3. #define _UNICODE
  4. #endif
  5. //+---------------------------------------------------------------------------------------------------------
  6. //
  7. // Includes
  8. //
  9. //+---------------------------------------------------------------------------------------------------------
  10. #include<stdio.h>
  11. #include<stdlib.h>
  12. #include<windows.h>
  13. #include<winuser.h>
  14. #include<ntsecapi.h>
  15. #include<Winnetwk.h>
  16. #include<lmserver.h>
  17. #include<lmcons.h>
  18. #include<lm.h>
  19. //+---------------------------------------------------------------------------------------------------------
  20. //
  21. // Definitions
  22. //
  23. //+---------------------------------------------------------------------------------------------------------
  24. // from NTSTATUS.H
  25. #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) // ntsubauth
  26. #define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)
  27. // local definitions
  28. #define MAX_STRING 255
  29. #define WINLOGON_REGKEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
  30. //+---------------------------------------------------------------------------------------------------------
  31. //
  32. // Prototypes
  33. //
  34. //+---------------------------------------------------------------------------------------------------------
  35. // from shared.c
  36. VOID
  37. DisplayMessage(
  38. WCHAR *MessageText);
  39. WCHAR*
  40. GetErrorString(
  41. DWORD dwErrorCode);
  42. DWORD
  43. GetRegValueSZ(
  44. WCHAR *RegValue,
  45. WCHAR *ValueName);
  46. DWORD
  47. ClearRegPassword();
  48. DWORD
  49. SetRegValueSZ(
  50. WCHAR *ValueName,
  51. WCHAR *ValueData);
  52. DWORD
  53. GetRegistryHandle(
  54. HKEY *hKey,
  55. REGSAM samDesired);
  56. DWORD
  57. GetPolicyHandle(
  58. LSA_HANDLE *LsaPolicyHandle);
  59. DWORD
  60. SetSecret(
  61. WCHAR *Password,
  62. BOOL bClearSecret);
  63. DWORD
  64. GetSecret(
  65. WCHAR *Password);
  66. DWORD
  67. GetMajorNTVersion(
  68. WCHAR *Server);