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.

118 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. regutil.h
  5. Abstract:
  6. This is the include file for the registry utility functions.
  7. Author:
  8. Steve Wood (stevewo) 10-Mar-1992
  9. Revision History:
  10. --*/
  11. #include <nt.h>
  12. #include <ntrtl.h>
  13. #include <nturtl.h>
  14. #include <windows.h>
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <errno.h>
  18. #include <ctype.h>
  19. #include <string.h>
  20. // #include <io.h>
  21. #include <fcntl.h>
  22. #include <malloc.h>
  23. #include <sys\types.h>
  24. #include <sys\stat.h>
  25. #define VALUE_BUFFER_SIZE (4096 * 100)
  26. void
  27. RegInitialize( void );
  28. typedef struct _REG_UNICODE_FILE {
  29. LARGE_INTEGER LastWriteTime;
  30. PWSTR FileContents;
  31. PWSTR EndOfFile;
  32. PWSTR BeginLine;
  33. PWSTR EndOfLine;
  34. PWSTR NextLine;
  35. } REG_UNICODE_FILE, *PREG_UNICODE_FILE;
  36. NTSTATUS
  37. RegReadBinaryFile(
  38. IN PUNICODE_STRING FileName,
  39. OUT PVOID *ValueBuffer,
  40. OUT PULONG ValueLength
  41. );
  42. NTSTATUS
  43. RegLoadAsciiFileAsUnicode(
  44. IN PUNICODE_STRING FileName,
  45. OUT PREG_UNICODE_FILE UnicodeFile
  46. );
  47. BOOLEAN DebugOutput;
  48. BOOLEAN SummaryOutput;
  49. BOOLEAN
  50. RegGetNextLine(
  51. IN OUT PREG_UNICODE_FILE UnicodeFile,
  52. OUT PULONG IndentAmount,
  53. OUT PWSTR *FirstEqual
  54. );
  55. BOOLEAN
  56. RegGetKeyValue(
  57. IN PUNICODE_STRING KeyValue,
  58. IN OUT PREG_UNICODE_FILE UnicodeFile,
  59. OUT PULONG ValueType,
  60. OUT PVOID *ValueBuffer,
  61. OUT PULONG ValueLength
  62. );
  63. BOOLEAN
  64. RegGetMultiString(
  65. IN OUT PUNICODE_STRING ValueString,
  66. OUT PUNICODE_STRING MultiString
  67. );
  68. void
  69. RegDumpKeyValue(
  70. FILE *fh,
  71. PKEY_VALUE_FULL_INFORMATION KeyValueInformation,
  72. ULONG IndentLevel
  73. );
  74. //
  75. // routines for creating security descriptors (regacl.c)
  76. //
  77. BOOLEAN
  78. RegInitializeSecurity(
  79. VOID
  80. );
  81. BOOLEAN
  82. RegCreateSecurity(
  83. IN PUNICODE_STRING Description,
  84. OUT PSECURITY_DESCRIPTOR SecurityDescriptor
  85. );
  86. VOID
  87. RegDestroySecurity(
  88. IN PSECURITY_DESCRIPTOR SecurityDescriptor
  89. );
  90.