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.

126 lines
4.8 KiB

  1. //-----------------------------------------------------------------------//
  2. //
  3. // File: Reg.h
  4. // Created: Jan 1997
  5. // By: Martin Holladay (a-martih)
  6. // Purpose: Header file for Reg.cpp
  7. // Modification History:
  8. // Created - Jan 1997 (a-martih)
  9. // Aug 1997 - MartinHo - Incremented to 1.01 for bug fixes in:
  10. // load.cpp, unload.cpp, update.cpp, save.cpp & restore.cpp
  11. // Sept 1997 - MartinHo - Incremented to 1.02 for update:
  12. // increased value date max to 2048 bytes
  13. // Oct 1997 - MartinHo - Incremented to 1.03 for REG_MULTI_SZ bug fixes.
  14. // Correct support for REG_MULTI_SZ with query, add and update.
  15. // April 1998 - MartinHo - Fixed RegOpenKey() in Query.cpp to not require
  16. // KEY_ALL_ACCESS but rather KEY_READ.
  17. // June 1998 - MartinHo - Increased LEN_MACHINENAME to 18 to account for the
  18. // leading "\\" characters. (version 1.05)
  19. // Feb 1999 - A-ERICR - added reg dump, reg find, and many bug fixes(1.06)
  20. // April 1999 Zeyong Xu: re-design, revision -> version 2.0
  21. //
  22. //------------------------------------------------------------------------//
  23. #ifndef _REG_H
  24. #define _REG_H
  25. #include "appvars.h"
  26. LONG AddRegistry(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  27. VOID
  28. InitGlobalStrings(
  29. VOID);
  30. void InitAppVars(PAPPVARS pAppVars);
  31. void FreeAppVars(PAPPVARS pAppVars);
  32. void Banner();
  33. REG_STATUS BreakDownKeyString(TCHAR *szStr, PAPPVARS pAppVars);
  34. REG_STATUS ParseKeyName(TCHAR *szStr, PAPPVARS pAppVars);
  35. BOOL BSearchRegistry(LPTSTR lpszKey,
  36. PTSTR lpszSearch,
  37. LPTSTR lpszValue,
  38. DWORD dwType,
  39. DWORD dwSizeOfValue);
  40. LONG CopyEnumerateKey(HKEY hKey,
  41. TCHAR* szSubKey,
  42. HKEY hDstKey,
  43. TCHAR* szDstSubKey,
  44. BOOL *bOverWriteAll,
  45. BOOL bSubToAll);
  46. LONG CopyRegistry(PAPPVARS pAppVars,
  47. PAPPVARS pDstVars,
  48. UINT argc,
  49. TCHAR *argv[]);
  50. LONG CopyValue(HKEY hKey,
  51. TCHAR* szValueName,
  52. HKEY hDstKey,
  53. TCHAR* szDstValueName,
  54. BOOL *bOverWriteAll);
  55. LONG RecursiveDeleteKey(HKEY hKey, LPCTSTR szName);
  56. LONG DeleteRegistry(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  57. LONG DeleteValues(PAPPVARS pAppVars);
  58. void ErrorMessage(UINT nErr);
  59. void GetTypeStrFromType(TCHAR *szTypeStr, DWORD dwType);
  60. REG_STATUS ParseMachineName(TCHAR* szStr, PAPPVARS pAppVars);
  61. DWORD IsRegDataType(TCHAR *szStr);
  62. LONG LoadHive(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  63. BOOL Prompt(LPCTSTR szFormat, LPCTSTR szStr, BOOL bForce);
  64. LONG QueryEnumerateKey(HKEY hKey,
  65. TCHAR* szFullKey,
  66. BOOL bRecurseSubKeys);
  67. LONG QueryRegistry(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  68. LONG QueryValue(HKEY hKey, TCHAR* szValueName);
  69. LONG RegAdjustTokenPrivileges(TCHAR *szMachine,
  70. TCHAR *szPrivilege,
  71. LONG nAttribute);
  72. LONG RegConnectMachine(PAPPVARS pAppVars);
  73. LONG RestoreHive(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  74. LONG RegRestoreKeyWin98(HKEY hKey,
  75. TCHAR* szSubKey,
  76. TCHAR* szFile);
  77. LONG SaveHive(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  78. LONG UnLoadHive(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  79. void Usage(APPVARS AppVars);
  80. void Who();
  81. LONG ExportRegFile(PAPPVARS pAppVars,UINT argc,TCHAR *argv[]);
  82. LONG ImportRegFile(PAPPVARS pAppVars,UINT argc,TCHAR *argv[]);
  83. REG_STATUS ParseExportCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  84. REG_STATUS ParseImportCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  85. REG_STATUS ParseRegCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  86. REG_STATUS ParseAddCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  87. REG_STATUS ParseCopyCmdLine(PAPPVARS pAppVars,
  88. PAPPVARS pDstVars,
  89. UINT argc,
  90. TCHAR *argv[]);
  91. REG_STATUS ParseDeleteCmdLine(PAPPVARS pAppVars,
  92. UINT argc,
  93. TCHAR *argv[]);
  94. REG_STATUS ParseQueryCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  95. REG_STATUS ParseSaveCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  96. REG_STATUS ParseUnLoadCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  97. REG_STATUS ParseExportCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  98. REG_STATUS ParseImportCmdLine(PAPPVARS pAppVars, UINT argc, TCHAR *argv[]);
  99. LONG CompareRegistry(PAPPVARS pAppVars,
  100. PAPPVARS pDstVars,
  101. UINT argc,
  102. TCHAR *argv[]);
  103. int __cdecl
  104. MyTPrintf(
  105. FILE* fp,
  106. LPCTSTR FormatString,
  107. ...
  108. );
  109. extern TCHAR g_NoName[100];
  110. BOOL SetThreadUILanguage0( DWORD dwReserved );
  111. #endif //_REG_H