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-boun...@reactos.org] De la part de Thomas Faber
Envoyé : lundi 12 juin 2017 21:16
À : ros-dev@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, hbelu...@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@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev


_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to