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.

101 lines
2.8 KiB

  1. // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
  2. //
  3. // Copyright (c) 1985-2000 Microsoft Corporation
  4. //
  5. // This file is part of the Microsoft Research IPv6 Network Protocol Stack.
  6. // You should have received a copy of the Microsoft End-User License Agreement
  7. // for this software along with this release; see the file "license.txt".
  8. // If not, please see http://www.research.microsoft.com/msripv6/license.htm,
  9. // or write to Microsoft Research, One Microsoft Way, Redmond, WA 98052-6399.
  10. //
  11. // Abstract:
  12. //
  13. // NT registry helper function declarations.
  14. //
  15. #ifndef NTREG_INCLUDED
  16. #define NTREG_INCLUDED 1
  17. typedef enum {
  18. OpenRegKeyRead,
  19. OpenRegKeyCreate,
  20. OpenRegKeyDeleting
  21. } OpenRegKeyAction;
  22. NTSTATUS
  23. OpenRegKey(PHANDLE HandlePtr, HANDLE Parent, const WCHAR *KeyName,
  24. OpenRegKeyAction Action);
  25. NTSTATUS
  26. RegDeleteValue(HANDLE KeyHandle, const WCHAR *ValueName);
  27. NTSTATUS
  28. GetRegDWORDValue(HANDLE KeyHandle, const WCHAR *ValueName, PULONG ValueData);
  29. NTSTATUS
  30. SetRegDWORDValue(HANDLE KeyHandle, const WCHAR *ValueName, ULONG ValueData);
  31. NTSTATUS
  32. SetRegQUADValue(HANDLE KeyHandle, const WCHAR *ValueName,
  33. const LARGE_INTEGER *ValueData);
  34. NTSTATUS
  35. GetRegIPAddrValue(HANDLE KeyHandle, const WCHAR *ValueName, IPAddr *Addr);
  36. NTSTATUS
  37. SetRegIPAddrValue(HANDLE KeyHandle, const WCHAR *ValueName, IPAddr Addr);
  38. #if 0
  39. NTSTATUS
  40. GetRegStringValue(HANDLE KeyHandle, const WCHAR *ValueName,
  41. PKEY_VALUE_PARTIAL_INFORMATION *ValueData,
  42. PUSHORT ValueSize);
  43. NTSTATUS
  44. GetRegSZValue(HANDLE KeyHandle, const WCHAR *ValueName,
  45. PUNICODE_STRING ValueData, PULONG ValueType);
  46. NTSTATUS
  47. GetRegMultiSZValue(HANDLE KeyHandle, const WCHAR *ValueName,
  48. PUNICODE_STRING ValueData);
  49. const WCHAR *
  50. EnumRegMultiSz(IN const WCHAR *MszString, IN ULONG MszStringLength,
  51. IN ULONG StringIndex);
  52. #endif // 0
  53. VOID
  54. InitRegDWORDParameter(HANDLE RegKey, const WCHAR *ValueName,
  55. UINT *Value, UINT DefaultValue);
  56. VOID
  57. InitRegQUADParameter(HANDLE RegKey, const WCHAR *ValueName,
  58. LARGE_INTEGER *Value);
  59. extern NTSTATUS
  60. OpenTopLevelRegKey(const WCHAR *Name,
  61. OUT HANDLE *RegKey, OpenRegKeyAction Action);
  62. extern NTSTATUS
  63. DeleteTopLevelRegKey(const WCHAR *Name);
  64. typedef NTSTATUS
  65. (*EnumRegKeysCallback)(
  66. void *Context,
  67. HANDLE ParentKey,
  68. WCHAR *SubKeyName);
  69. extern NTSTATUS
  70. EnumRegKeyIndex(HANDLE RegKey, uint Index,
  71. EnumRegKeysCallback Callback, void *Context);
  72. extern NTSTATUS
  73. EnumRegKeys(HANDLE RegKey, EnumRegKeysCallback Callback, void *Context);
  74. extern NTSTATUS
  75. DeleteRegKey(HANDLE RegKey);
  76. #endif // NTREG_INCLUDED