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.

108 lines
2.3 KiB

  1. /**************************************************************************************************
  2. FILENAME: BootOptimizeNtfs.h
  3. COPYRIGHT 2001 Microsoft Corporation and Executive Software International, Inc.
  4. DESCRIPTION:
  5. Boot Optimize.
  6. **************************************************************************************************/
  7. //
  8. // Prototype for NtFsControlFile and data structures
  9. // used in its definition
  10. //
  11. #ifndef _BOOTOPTIMIZE_H_
  12. #define _BOOTOPTIMIZE_H_
  13. typedef struct _FILE_LIST_ENTRY *PFILE_LIST_ENTRY;
  14. typedef struct _FREE_SPACE_ENTRY *PFREE_SPACE_ENTRY;
  15. BOOL
  16. InitialiseBootOptimise(
  17. IN CONST BOOL bIsNtfs
  18. );
  19. DWORD
  20. ProcessBootOptimise();
  21. BOOL
  22. UpdateInBootOptimiseList(
  23. IN PFILE_LIST_ENTRY pFileListEntry = NULL
  24. );
  25. DWORD BootOptimize(
  26. IN HANDLE hVolumeHandle,
  27. IN LONGLONG BitmapSize,
  28. IN LONGLONG BytesPerSector,
  29. IN LONGLONG TotalClusters,
  30. IN BOOL IsNtfs,
  31. IN ULONGLONG MftZoneStart,
  32. IN ULONGLONG MftZoneEnd,
  33. IN TCHAR tDrive
  34. );
  35. BOOL LoadOptimizeFileList(
  36. IN TCHAR* cBootOptimzePath,
  37. IN BOOL IsNtfs,
  38. IN TCHAR tDrive,
  39. IN UINT uNumberofRecords
  40. );
  41. VOID FreeFileList();
  42. LONGLONG GetSizeInformationAboutFiles();
  43. LONGLONG GetFileSizeInfo(
  44. IN HANDLE hBootOptimizeFileHandle
  45. );
  46. BOOL MoveFilesInOrder(
  47. IN ULONGLONG lMoveFileHere,
  48. IN ULONGLONG lEndOfFreeSpace,
  49. IN HANDLE hBootVolumeHandle
  50. );
  51. BOOL GetBootOptimizeFileStreams(
  52. IN HANDLE hBootOptimizeFileHandle,
  53. IN TCHAR* tBootOptimizeFile,
  54. IN UINT uNumberofRecords
  55. );
  56. static PTCHAR ParseStreamName(
  57. IN PTCHAR StreamName
  58. );
  59. HANDLE GetFileHandle(
  60. IN LPCTSTR lpFilePath
  61. );
  62. BOOL GetRegistryEntires(
  63. OUT TCHAR cBootOptimzePath[MAX_PATH]
  64. );
  65. VOID SetRegistryEntires(
  66. IN LONGLONG lLcnStartLocation,
  67. IN LONGLONG lLcnEndLocation
  68. );
  69. BOOL CloseFileHandle(
  70. IN HANDLE hBootOptimizeFileHandle
  71. );
  72. BOOL OpenReadBootOptimeFileIntoList(
  73. IN TCHAR* cBootOptimzePath,
  74. IN BOOL IsNtfs,
  75. IN TCHAR tDrive
  76. );
  77. BOOL IsAValidFile(
  78. IN TCHAR pBootOptimizeFileName[MAX_PATH+1],
  79. IN TCHAR tDrive
  80. );
  81. VOID SaveErrorInRegistry(
  82. TCHAR* tComplete,
  83. TCHAR* tErrorString
  84. );
  85. LONGLONG GetStartingEndLncLocations(
  86. IN PTCHAR pRegKey
  87. );
  88. BOOL CheckDateTimeStampInputFile(
  89. IN TCHAR cBootOptimzePath[MAX_PATH]
  90. );
  91. #endif // #define _BOOTOPTIMIZE_H_