Today, RtlCreateActivationContext (CreateActCtxW) opens the source
manifest file via NtOpenFile without the FILE_SHARE_DELETE sharing mode.
This causes CreateActCtxW to fail if the source manifest file was
created with the FILE_DELETE_ON_CLOSE flag. FILE_DELETE_ON_CLOSE is
often used for temporary files that should be automatically deleted
after use, even if the creator process crashes.
Fix this by specifying FILE_SHARE_DELETE for sharing mode when opening
the source manifest or module file. This allows the source manifest or
module file to be marked as deleted while it is open.
Note that concurrent deletion is not an issue for the following reasons:
- The ability to read from an open file handle is unaffected by deletion
of the corresponding file's name.
- RtlCreateActivationContext does not open the source manifest or module
file by the given filename (lpSource) more than once.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2433
Hans Leidekker (@hans) commented about loader/wine.inf.in:
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
> +HKLM,%CurrentVersionNT%,"EditionId",2,"Core"
> HKLM,%CurrentVersionNT%,"ProductName",2,"Windows 10 Pro"
Why "Core"? It seems to me that "Professional" would make more sense given that ProductName is "Windows 10 Pro".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2438#note_27258
After today's rebase, I found a workaround for creating new documents. You can open an existing document, then click on the home tab, and create a new document in one of the tabs. There seems to a bit of UB left, but it's better than nothing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2377#note_27257