--
v3: ntdll: Add support for FILE_{RENAME,LINK}_POSIX_SEMANTICS.
ntdll: Factored out get_inode_open_sharing.
ntdll/test: Add tests for FILE_LINK_POSIX_SEMANTICS.
ntdll/test: Add tests for FILE_RENAME_POSIX_SEMANTICS.
ntdll: Add support for FILE_{RENAME,LINK}_IGNORE_READONLY_ATTRIBUTE.
server: Don't allow read-only files to be replaced by File{Rename,Link}Information{,Ex}.
ntdll/test: Add tests for FILE_LINK_IGNORE_READONLY_ATTRIBUTE.
ntdll/test: Add tests for FILE_RENAME_IGNORE_READONLY_ATTRIBUTE.
ntdll/test: Use FileDispositionInformationEx to delete files and directories.
ntdll: Initial implementation of FileLinkInformationEx.
ntdll: Initial implementation of FileRenameInformationEx.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3907
Resolves https://bugs.winehq.org/show_bug.cgi?id=9127 . (Some of the named programs in that issue may require additional currently-missing functionality, I didn't check; but if so, that's separate issues.)
Tested with
- winetest on Windows 7
- winetest on Windows 10
- winetest in Wine, of course
- microkiri https://bugs.winehq.org/show_bug.cgi?id=9127#c102
- Wagamama High Spec Trial Edition https://wagahigh.com/download_trial.php#normal (ダウンロード means download)
- Ninki Seiyuu no Tsukurikata Trial https://archive.org/details/sayou_trial
(WMV files in microkiri and Wagamama don't work, but that's separate issues. Also, they need the LC_ALL=ja_JP env, or they throw various goofy errors.)
--
v6: quartz/tests: Add tests for CLSID_CMpegVideoCodec.
quartz/tests: Add tests for new CLSID_MPEG1Splitter functionality.
winegstreamer: Improve and clean up some debug logs.
winegstreamer: Implement a little more of IAMStreamSelect in CLSID_MPEG1Splitter.
winegstreamer: Handle format changes better in Quartz.
winegstreamer: Implement CLSID_CMpegVideoCodec.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3938
Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/tests/system.c:
> + /* Call ShouldSystemUseDarkMode() and check for errors */
> + SetLastError(ERROR_SUCCESS); /* Clear error buffer so that we can detect if an error occurred. */
> + function_result = pShouldSystemUseDarkMode();
> + last_error = GetLastError();
> + ok(last_error == ERROR_SUCCESS, "ShouldSystemUseDarkMode failed (?) with error %ld.\n",
> + last_error);
> +
> + /* Expect same value as key */
> + ok(function_result == !system_uses_light_theme, "Expected value %d, got %d.\n",
> + !system_uses_light_theme, function_result);
> +
> + ls = RegDeleteValueA(hk, "AppsUseLightTheme");
> + ok(ls == 0, "RegDeleteValueA failed: %ld.\n", ls);
> +
> + /* Call ShouldSystemUseDarkMode() and check for errors with deleted value */
> + SetLastError(ERROR_SUCCESS); /* Clear error buffer so that we can detect if an error occurred. */
For the last error code. You can SetLastError(0xdeadbeef) before the call and check that the last error is set to ERROR_SUCCESS after the call. And then you set the last error code in the ShouldSystemUseDarkMode() implementation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3959#note_47274
Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/system.c:
> UnregisterUserApiHook();
> return TRUE;
> }
> +
> +/**********************************************************************
> + * ShouldSystemUseDarkMode (UXTHEME.138)
> + *
> + * RETURNS
> + * Whether or not the system/app should use dark mode.
Shouldn't `system/app` be `system`? because there is a ShouldAppsUseDarkMode() as you said previously.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3959#note_47273
Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/system.c:
> UnregisterUserApiHook();
> return TRUE;
> }
> +
> +/**********************************************************************
> + * ShouldSystemUseDarkMode (UXTHEME.138)
> + *
> + * RETURNS
> + * Whether or not the system/app should use dark mode.
> + */
> +BOOL WINAPI ShouldSystemUseDarkMode(void)
> +{
> + DWORD system_uses_light_theme_size = sizeof(DWORD);
You can remove the system_uses_ prefix. These codes are in ShouldSystemUseDarkMode() so it's already known that it's for querying system settings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3959#note_47272
Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/system.c:
> +/**********************************************************************
> + * ShouldSystemUseDarkMode (UXTHEME.138)
> + *
> + * RETURNS
> + * Whether or not the system/app should use dark mode.
> + */
> +BOOL WINAPI ShouldSystemUseDarkMode(void)
> +{
> + DWORD system_uses_light_theme_size = sizeof(DWORD);
> + /* Persists between calls, in windows it might look up some internal table. */
> + static DWORD system_uses_light_theme = TRUE;
> +
> + /* We don't necessarily care that this might fail because it doesn't affect
> + * system_uses_light_theme if it does.
> + */
> + RegGetValueA(HKEY_CURRENT_USER,
Please use RegGetValueW() instead so that we don't have to do ASCII/Unicode conversion every time this gets called.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3959#note_47271