[ros-dev] [ros-diffs] [hbelusca] 75008: [USETUP]: Introduce SetupDeleteFile() and SetupMoveFile() (in addition to the already-existing SetupCopyFile()) in order to implement moving / renaming existing files. Will be use...
Hermès BÉLUSCA-MAÏTO
hermes.belusca at sfr.fr
Mon Jun 12 19:51:38 UTC 2017
Yes, only the SetupMoveFile would need SEH2 (I took it from the kernel32 code, MoveFile(Ex) and associated Basep** function(s), which used SEH2). I agree, as it is, the SEH2 usage here is hackish (as I've redefined the SEH macros in filesup.h, because I didn't want to include SEH library in usetup yet, while keeping the SetupMoveFile code close to the original one) .
"> This variable fulfills the requirements for _SEH2_VOLATILE"
You should then check the corresponding kernel32 code that may need such a fix.
Thanks for the review,
Hermès
-----Message d'origine-----
De : Ros-dev [mailto:ros-dev-bounces at reactos.org] De la part de Thomas Faber
Envoyé : lundi 12 juin 2017 21:16
À : ros-dev at reactos.org
Objet : Re: [ros-dev] [ros-diffs] [hbelusca] 75008: [USETUP]: Introduce SetupDeleteFile() and SetupMoveFile() (in addition to the already-existing SetupCopyFile()) in order to implement moving / renaming existing files. Will be use...
On 2017-06-12 01:58, hbelusca at svn.reactos.org wrote:
> +NTSTATUS
> +SetupMoveFile(
> + IN PCWSTR ExistingFileName,
> + IN PCWSTR NewFileName,
> + IN ULONG Flags)
> +{
> + NTSTATUS Status;
> + IO_STATUS_BLOCK IoStatusBlock;
> + OBJECT_ATTRIBUTES ObjectAttributes;
> + PFILE_RENAME_INFORMATION RenameInfo;
> + UNICODE_STRING NewPathU, ExistingPathU;
> + HANDLE SourceHandle = NULL;
This variable fulfills the requirements for _SEH2_VOLATILE
> + BOOLEAN ReplaceIfExists;
> +
> + RtlInitUnicodeString(&ExistingPathU, ExistingFileName);
> + RtlInitUnicodeString(&NewPathU, NewFileName);
> +
> + _SEH2_TRY
> + {
Which part of this code needs SEH? That looks like it's purely hiding bugs.
_______________________________________________
Ros-dev mailing list
Ros-dev at reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
More information about the Ros-dev
mailing list