mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 00:53:03 +00:00
[SETUPLIB][USETUP] Refactor the DoesFileExist() function so that it now looks closer to DoesPathExist() and use it almost everywhere.
- Adjust also its callers, adjust OpenAndMapFile() parameters. - Related to that, simplify IsValidNTOSInstallation() parameters & introduce a IsValidNTOSInstallation_UStr() that does the same, but takes a UNICODE_STRING instead. - Simplify CheckForValidPEAndVendor(). Now only exactly 5 calls use the "old" 'DoesFileExist' syntax, using a temporarily auxiliary function "DoesFileExist_2"... svn path=/branches/setup_improvements/; revision=74641
This commit is contained in:
parent
d27ef70aab
commit
b53b7b11e3
5 changed files with 110 additions and 119 deletions
|
@ -51,6 +51,11 @@ DoesPathExist(
|
|||
BOOLEAN
|
||||
DoesFileExist(
|
||||
IN HANDLE RootDirectory OPTIONAL,
|
||||
IN PCWSTR PathNameToFile);
|
||||
|
||||
// FIXME: DEPRECATED! HACKish function that needs to be deprecated!
|
||||
BOOLEAN
|
||||
DoesFileExist_2(
|
||||
IN PCWSTR PathName OPTIONAL,
|
||||
IN PCWSTR FileName);
|
||||
|
||||
|
@ -64,8 +69,7 @@ NtPathToDiskPartComponents(
|
|||
NTSTATUS
|
||||
OpenAndMapFile(
|
||||
IN HANDLE RootDirectory OPTIONAL,
|
||||
IN PCWSTR PathName OPTIONAL,
|
||||
IN PCWSTR FileName, // OPTIONAL
|
||||
IN PCWSTR PathNameToFile,
|
||||
OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL
|
||||
OUT PHANDLE SectionHandle,
|
||||
OUT PVOID* BaseAddress,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue