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.

111 lines
3.0 KiB

  1. // Copyright (c) 2001 Microsoft Corporation, All Rights Reserved
  2. #ifndef __PROFILE_STRING__
  3. #define __PROFILE_STRING__
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif
  7. // MAPPINGS
  8. #define MY_SHARED_PTR(TYPE_NAME) ULONG_PTR
  9. #define MY_SHARED_STRING LPWSTR
  10. #define REGISTRY_MAPPING_WRITE_TO_INIFILE_TOO 0x00000001
  11. #define REGISTRY_MAPPING_INIT_FROM_INIFILE 0x00000002
  12. #define REGISTRY_MAPPING_READ_FROM_REGISTRY_ONLY 0x00000004
  13. #define REGISTRY_MAPPING_APPEND_BASE_NAME 0x10000000
  14. #define REGISTRY_MAPPING_APPEND_APPLICATION_NAME 0x20000000
  15. #define REGISTRY_MAPPING_SOFTWARE_RELATIVE 0x40000000
  16. #define REGISTRY_MAPPING_USER_RELATIVE 0x80000000
  17. typedef struct _REGISTRY_MAPPING_TARGET
  18. {
  19. MY_SHARED_PTR(struct _REGISTRY_MAPPING_TARGET *) Next;
  20. MY_SHARED_STRING RegistryPath;
  21. } REGISTRY_MAPPING_TARGET, *PREGISTRY_MAPPING_TARGET;
  22. typedef struct _REGISTRY_MAPPING_VARNAME
  23. {
  24. MY_SHARED_PTR(struct _REGISTRY_MAPPING_VARNAME *) Next;
  25. MY_SHARED_STRING Name;
  26. ULONG MappingFlags;
  27. MY_SHARED_PTR(PREGISTRY_MAPPING_TARGET) MappingTarget;
  28. } REGISTRY_MAPPING_VARNAME, *PREGISTRY_MAPPING_VARNAME;
  29. typedef struct _REGISTRY_MAPPING_APPNAME
  30. {
  31. MY_SHARED_PTR(struct _REGISTRY_MAPPING_APPNAME *) Next;
  32. MY_SHARED_STRING Name;
  33. MY_SHARED_PTR(PREGISTRY_MAPPING_VARNAME) VariableNames;
  34. MY_SHARED_PTR(PREGISTRY_MAPPING_VARNAME) DefaultVarNameMapping;
  35. } REGISTRY_MAPPING_APPNAME, *PREGISTRY_MAPPING_APPNAME;
  36. typedef struct _REGISTRY_MAPPING_NAME
  37. {
  38. MY_SHARED_PTR(struct _REGISTRY_MAPPING_NAME *) Next;
  39. MY_SHARED_STRING Name;
  40. MY_SHARED_PTR(PREGISTRY_MAPPING_APPNAME) ApplicationNames;
  41. MY_SHARED_PTR(PREGISTRY_MAPPING_APPNAME) DefaultAppNameMapping;
  42. } REGISTRY_MAPPING_NAME, *PREGISTRY_MAPPING_NAME;
  43. typedef struct _REGISTRY_MAPPING
  44. {
  45. MY_SHARED_PTR(PREGISTRY_MAPPING_NAME) MyRegistryMapping;
  46. ULONG Reserved;
  47. } REGISTRY_MAPPING, *PREGISTRY_MAPPING;
  48. // operation enum
  49. typedef enum _REGISTRY_OPERATION
  50. {
  51. Registry_None,
  52. Registry_ReadKeyValue,
  53. Registry_ReadKeyName,
  54. Registry_ReadSectionValue,
  55. Registry_ReadSectionName
  56. } REGISTRY_OPERATION;
  57. // parameters
  58. typedef struct _REGISTRY_PARAMETERS
  59. {
  60. #ifdef WRITE_OPERATION
  61. BOOLEAN WriteOperation;
  62. #endif WRITE_OPERATION
  63. REGISTRY_OPERATION Operation;
  64. BOOLEAN MultiValueStrings;
  65. BOOLEAN ValueBufferAllocated;
  66. PREGISTRY_MAPPING_NAME Mapping;
  67. LPCWSTR FileName;
  68. LPCWSTR ApplicationName;
  69. LPCWSTR VariableName;
  70. union
  71. {
  72. #ifdef WRITE_OPERATION
  73. //
  74. // This structure filled in for write operations
  75. //
  76. struct
  77. {
  78. LPWSTR ValueBuffer;
  79. ULONG ValueLength;
  80. };
  81. #endif WRITE_OPERATION
  82. //
  83. // This structure filled in for read operations
  84. //
  85. struct
  86. {
  87. ULONG ResultChars; // number of characters
  88. ULONG ResultMaxChars; // number of max characters
  89. LPWSTR ResultBuffer;
  90. };
  91. };
  92. } REGISTRY_PARAMETERS, *PREGISTRY_PARAMETERS;
  93. #endif __PROFILE_STRING__