Re: [PATCH] MSI: Shedule rename operation also for ERROR_USER_MAPPED_FILE.

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [PATCH] MSI: Shedule rename operation also for ERROR_USER_MAPPED_FILE.

by Hans Leidekker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 30 October 2009 14:10:27 Michael Martin wrote:

> Add check for ERROR_USER_MAPPED_FILE in addition to ERROR_SHARING_VIOLATION
> when scheduling a rename operation. ERROR_USER_MAPPED_FILE can be set when
> trying to overwrite true type fonts in windows.
> For more info see http://support.microsoft.com/kb/944507

Which installer is affected by this?

 -Hans



Parent Message unknown Re: [PATCH] MSI: Shedule rename operation also for ERROR_USER_MAPPED_FILE.

by Hans Leidekker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 31 October 2009 05:22:31 you wrote:

> I haven't came across an installer yet that fails on WINE because of this.
> I have jumped ahead a bit here.
>
> Regardless, if a file has been mapped by using CreateFileMapping/MapViewOfFile
> and the CopyFile api (having the last parameter as FALSE) is used in an attempt
> to overwrite it, CopyFile will of course fail.
> In Windows, XP and 2k at least, GetLastError in this case will return
> ERROR_USER_MAPPED_FILE. Currently WINE does not return this error code, actually
> it returns ERROR_ALREADY_EXISTS which is incorrect. So that would have to be
> fixed in WINE to see the problem in an msi installer.
>
> Im assuming Im gonna have to create a test for for kernel32/file.c showing the
> wrong error set for CopyFile failing in that case before this patch can be accepted?

It would need a fix as well. There's no point in checking for this error if
Wine doesn't return it.

 -Hans



Parent Message unknown Re: [PATCH] MSI: Shedule rename operation also for ERROR_USER_MAPPED_FILE.

by Hans Leidekker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 31 October 2009 11:10:35 Michael Martin wrote:

> Understand,
> I guess ill write some wine test to check different return values for differences on mapped files.
> Can you give me a pointer on where this would best fit in?
> kernel32/tests/file.c:  test_CopyFileW, or should i make my own function for the tests?

This likely also affects CreateFile, MoveFile, etc, so I would create a new
function for it.

 -Hans