kernel32: Implement ReplaceFileW. [RESEND]

Alexandre Julliard julliard at winehq.org
Tue Feb 5 06:25:25 CST 2008


Robert Shearman <rob at codeweavers.com> writes:

> +    /*
> +     * Open the replacement file for reading, writing, and deleting
> +     * (writing and deleting are needed when finished)
> +     */
> +    if ((hReplacement = CreateFileW(lpReplacementFileName,
> +        GENERIC_READ | GENERIC_WRITE,
> +        FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
> +        NULL, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE)
> +    {
> +        error = GetLastError(); /* Use error returned by CreateFileW */
> +        goto fail;
> +    }

Files should be opened with NtOpenFile the same way MoveFile does, to
avoid having to convert path names twice.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list