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.

94 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: Main.h
  7. //
  8. // Contents: Header file for function proto types for main.cpp
  9. //
  10. // Objects:
  11. //
  12. // Coupling:
  13. //
  14. // Notes:
  15. //
  16. // History: 9/21/00 SHeffner Created
  17. //
  18. //----------------------------------------------------------------------------
  19. #ifndef _CMSRDIAG
  20. #define _CMSRDIAG
  21. //+---------------------------------------------------------------------------
  22. //
  23. // Function proto typing
  24. //
  25. //----------------------------------------------------------------------------
  26. void Log(char *szString);
  27. void Log2(char *szString, char *szString2);
  28. void GetRestoreGuid(char *szString);
  29. void SRGetFileInfo(char *szLogFile);
  30. void InfoPerFile(char *szLogFile, WCHAR *szFileName);
  31. void ArgParse(int argc, char *argv[], char *szArgCmd[]);
  32. void Usage();
  33. //+---------------------------------------------------------------------------
  34. //
  35. // Structure Definations
  36. //
  37. //----------------------------------------------------------------------------
  38. //Listing of the files, that we will gather in the version information, and file statics from.
  39. // This information will be stored in the SR-FileList.txt
  40. WCHAR *wszFileVersionList[] = { TEXT("\\system32\\drivers\\sr.sys"),
  41. TEXT("\\system32\\srclient.dll"),
  42. TEXT("\\system32\\srsvc.dll"),
  43. TEXT("\\system32\\srrstr.dll"),
  44. TEXT("\\system32\\restore\\filelist.xml"),
  45. TEXT("\\system32\\restore\\rstrui.exe"),
  46. TEXT("\\system32\\restore\\srframe.mmf"),
  47. TEXT("\\system32\\restore\\sr.mof"),
  48. TEXT("") };
  49. //Listing of the resourece strings that we are looking for in the structure wszFileVersionList.
  50. WCHAR *wszVersionResource[] = { TEXT("Comments"),
  51. TEXT("CompanyName"),
  52. TEXT("FileDescription"),
  53. TEXT("FileVersion"),
  54. TEXT("InternalName"),
  55. TEXT("LegalCopyright"),
  56. TEXT("LegalTrademarks"),
  57. TEXT("OriginalFilename"),
  58. TEXT("ProductName"),
  59. TEXT("ProductVersion"),
  60. TEXT("PrivateBuild"),
  61. TEXT("SpecialBuild"),
  62. TEXT("") };
  63. //Listing of the Registry keys that we are grabbing. The first param is the Path from HKLM, the Second Param
  64. // is either 0 for not recursing, or 1 if you want to recurse all of the sub keys.
  65. WCHAR *wszRegKeys[][2] = { TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion"), TEXT("0"),
  66. TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore"), TEXT("1"),
  67. TEXT("System\\CurrentControlSet\\Services\\SR"), TEXT("1"),
  68. TEXT("System\\CurrentControlSet\\Services\\SRService"), TEXT("1"),
  69. TEXT("Software\\Policies\\Microsoft\\Windows NT\\SystemRestore"), TEXT("1"),
  70. TEXT(""), TEXT("") };
  71. //Listing of the files that we will gather on the system into the cab, based on the relative root starting
  72. // from the Windir directory.
  73. char *szWindirFileCollection[] = { "\\system32\\restore\\machineguid.txt",
  74. "\\system32\\restore\\filelist.xml",
  75. "\\system32\\restore\\rstrlog.dat",
  76. "" };
  77. //Listing of the files, that we will collect at the root of the SystemVolumeInformation\_Restore{GUID} directory
  78. char *szSysVolFileCollection[] = { "_filelst.cfg",
  79. "drivetable.txt",
  80. "_driver.cfg",
  81. "fifo.log",
  82. "" };
  83. #endif