Source code of Windows XP (NT5)
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.

137 lines
4.0 KiB

  1. //
  2. // appvars.h
  3. //
  4. #ifndef __APPVARS__
  5. #define __APPVARS__
  6. // if _UNICODE, build reg.exe for Win2000
  7. // if ANSI, build reg98.exe for Win98
  8. #ifdef REG_FOR_WIN2000
  9. #undef REG_FOR_WIN2000
  10. #endif
  11. #ifdef _UNICODE
  12. #define REG_FOR_WIN2000
  13. #endif
  14. #define REG_EXE_FILEVERSION _T("3.0")
  15. #define LENGTH_MESSAGE 512
  16. #define LENGTH_USAGE 2048
  17. // options
  18. #define STR_QUERY _T("QUERY")
  19. #define STR_ADD _T("ADD")
  20. #define STR_DELETE _T("DELETE")
  21. #define STR_COPY _T("COPY")
  22. #define STR_SAVE _T("SAVE")
  23. #define STR_RESTORE _T("RESTORE")
  24. #define STR_LOAD _T("LOAD")
  25. #define STR_UNLOAD _T("UNLOAD")
  26. #define STR_COMPARE _T("COMPARE")
  27. #define STR_EXPORT _T("EXPORT")
  28. #define STR_IMPORT _T("IMPORT")
  29. //
  30. // ROOT Key String
  31. //
  32. #define STR_HKLM _T("HKLM")
  33. #define STR_HKCU _T("HKCU")
  34. #define STR_HKCR _T("HKCR")
  35. #define STR_HKU _T("HKU")
  36. #define STR_HKCC _T("HKCC")
  37. #define STR_HKEY_LOCAL_MACHINE _T("HKEY_LOCAL_MACHINE")
  38. #define STR_HKEY_CURRENT_USER _T("HKEY_CURRENT_USER")
  39. #define STR_HKEY_CLASSES_ROOT _T("HKEY_CLASSES_ROOT")
  40. #define STR_HKEY_USERS _T("HKEY_USERS")
  41. #define STR_HKEY_CURRENT_CONFIG _T("HKEY_CURRENT_CONFIG")
  42. // Data type
  43. #define STR_REG_SZ _T("REG_SZ")
  44. #define STR_REG_EXPAND_SZ _T("REG_EXPAND_SZ")
  45. #define STR_REG_MULTI_SZ _T("REG_MULTI_SZ")
  46. #define STR_REG_BINARY _T("REG_BINARY")
  47. #define STR_REG_DWORD _T("REG_DWORD")
  48. #define STR_REG_DWORD_LITTLE_ENDIAN _T("REG_DWORD_LITTLE_ENDIAN")
  49. #define STR_REG_DWORD_BIG_ENDIAN _T("REG_DWORD_BIG_ENDIAN")
  50. #define STR_REG_NONE _T("REG_NONE")
  51. #define STR_REG_LINK _T("REG_LINK")
  52. #define STR_REG_RESOURCE_LIST _T("REG_RESOURCE_LIST")
  53. //
  54. // #define Operations FLAGS
  55. //
  56. #define REG_NOOPERATION 0
  57. #define REG_QUERY 1
  58. #define REG_ADD 2
  59. #define REG_DELETE 4
  60. #define REG_COPY 5
  61. #define REG_SAVE 6
  62. #define REG_RESTORE 7
  63. #define REG_LOAD 8
  64. #define REG_UNLOAD 9
  65. #define REG_COMPARE 10
  66. #define REG_EXPORT 11
  67. #define REG_IMPORT 12
  68. //
  69. // #define REG_STATUS return Codes
  70. //
  71. typedef UINT REG_STATUS;
  72. #define REG_STATUS_TOMANYPARAMS 50000
  73. #define REG_STATUS_TOFEWPARAMS 50001
  74. #define REG_STATUS_INVALIDPARAMS 50002
  75. #define REG_STATUS_BADOPERATION 50003
  76. #define REG_STATUS_HELP 50004
  77. #define REG_STATUS_NONREMOTABLEROOT 50005
  78. #define REG_STATUS_NONLOADABLEROOT 50006
  79. #define REG_STATUS_COPYTOSELF 50007
  80. #define REG_STATUS_BADKEYNAME 50008
  81. #define REG_STATUS_NOKEYNAME 50009
  82. #define REG_STATUS_COMPARESELF 50010
  83. #define REG_STATUS_BADFILEFORMAT 50011
  84. #define REG_STATUS_NONREMOTABLE 50012
  85. #define PRINTTYPE_SAME 0
  86. #define PRINTTYPE_LEFT 1
  87. #define PRINTTYPE_RIGHT 2
  88. #define OUTPUTTYPE_NONE 0
  89. #define OUTPUTTYPE_DIFF 1
  90. #define OUTPUTTYPE_SAME 2
  91. #define OUTPUTTYPE_ALL 3
  92. typedef struct _APPVARS
  93. {
  94. HKEY hRootKey;
  95. UINT nOperation;
  96. DWORD dwRegDataType;
  97. BOOL bUseRemoteMachine;
  98. BOOL bCleanRemoteRootKey;
  99. BOOL bRecurseSubKeys;
  100. BOOL bAllValues;
  101. BOOL bForce;
  102. BOOL bNT4RegFile;
  103. BOOL bHasDifference;
  104. int nOutputType;
  105. TCHAR* szFullKey;
  106. TCHAR* szSubKey;
  107. TCHAR* szValueName;
  108. TCHAR* szMachineName;
  109. TCHAR* szValue;
  110. TCHAR szSeparator[3];
  111. } APPVARS, *PAPPVARS;
  112. #endif