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.

138 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spfile.h
  5. Abstract:
  6. Public header file for file-related functions in text setup.
  7. Author:
  8. Ted Miller (tedm) 29-July-1993
  9. Revision History:
  10. --*/
  11. #ifndef _SPFILE_DEFN_
  12. #define _SPFILE_DEFN_
  13. NTSTATUS
  14. SpGetFileSize(
  15. IN HANDLE hFile,
  16. OUT PULONG Size
  17. );
  18. NTSTATUS
  19. SpMapEntireFile(
  20. IN HANDLE hFile,
  21. OUT PHANDLE Section,
  22. OUT PVOID *ViewBase,
  23. IN BOOLEAN WriteAccess
  24. );
  25. BOOLEAN
  26. SpUnmapFile(
  27. IN HANDLE Section,
  28. IN PVOID ViewBase
  29. );
  30. NTSTATUS
  31. SpOpenAndMapFile(
  32. IN PWSTR FileName,
  33. IN OUT PHANDLE FileHandle,
  34. OUT PHANDLE SectionHandle,
  35. OUT PVOID *ViewBase,
  36. OUT PULONG FileSize,
  37. IN BOOLEAN WriteAccess
  38. );
  39. NTSTATUS
  40. SpSetInformationFile(
  41. IN HANDLE Handle,
  42. IN FILE_INFORMATION_CLASS FileInformationClass,
  43. IN ULONG Length,
  44. IN PVOID FileInformation
  45. );
  46. NTSTATUS
  47. SpDeleteFileEx(
  48. IN PCWSTR Name1,
  49. IN PCWSTR Name2, OPTIONAL
  50. IN PCWSTR Name3, OPTIONAL
  51. IN ULONG ShareFlags, OPTIONAL
  52. IN ULONG OpenFlags OPTIONAL
  53. );
  54. NTSTATUS
  55. SpDeleteFile(
  56. IN PCWSTR Name1,
  57. IN PCWSTR Name2, OPTIONAL
  58. IN PCWSTR Name3 OPTIONAL
  59. );
  60. NTSTATUS
  61. SpSetAttributes (
  62. IN PWSTR SrcNTPath,
  63. IN ULONG FileAttributes
  64. );
  65. NTSTATUS
  66. SpGetAttributes (
  67. IN PWSTR SrcNTPath,
  68. OUT PULONG FileAttributesPtr
  69. );
  70. BOOLEAN
  71. SpFileExists(
  72. IN PCWSTR PathName,
  73. IN BOOLEAN Directory
  74. );
  75. NTSTATUS
  76. SpRenameFile(
  77. IN PWSTR OldName,
  78. IN PWSTR NewName,
  79. IN BOOLEAN AllowDirectoryRename
  80. );
  81. PIMAGE_NT_HEADERS
  82. SpChecksumMappedFile(
  83. IN PVOID BaseAddress,
  84. IN ULONG FileSize,
  85. OUT PULONG HeaderSum,
  86. OUT PULONG Checksum
  87. );
  88. NTSTATUS
  89. SpOpenNameMayBeCompressed(
  90. IN PWSTR FullPath,
  91. IN ULONG OpenAccess,
  92. IN ULONG FileAttributes,
  93. IN ULONG ShareFlags,
  94. IN ULONG Disposition,
  95. IN ULONG OpenFlags,
  96. OUT PHANDLE Handle,
  97. OUT PBOOLEAN OpenedCompressedName OPTIONAL
  98. );
  99. NTSTATUS
  100. SpGetFileSizeByName(
  101. IN PWSTR DevicePath OPTIONAL,
  102. IN PWSTR Directory OPTIONAL,
  103. IN PWSTR FileName,
  104. OUT PULONG Size
  105. );
  106. VOID
  107. SpVerifyNoCompression(
  108. IN PWSTR FileName
  109. );
  110. #endif // ndef _SPFILE_DEFN_