This extension isn't very well documented, particularly in regards to the behavior of the timeout values, so I think it makes sense to add tests since an Implementation would necessarily be done by winevulkan.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/974
This seems to be more correct than what we previously had with fewer lines of code, so I like that. I still don't really like the extra flag I had to add for Nt{Create,Open}Key, but I couldn't find a way to make things work without it. I also checked that Windows doesn't use a similar flag (by iterating over all bit masks).
--
v2: ntdll/tests: Factor out the NtEnumerateKey() tests.
kernelbase: Remove special Wow64 handling for HKEY_CLASSES_ROOT.
kernelbase: Remove special Wow6432Node handling from RegCreateKeyEx().
kernelbase: Remove special Wow6432Node handling from RegOpenKeyEx().
server: Don't return the actual 32-bit Software\Classes key.
ntdll/tests: Add some some Software\Classes query and enumerate tests.
ntdll/tests: Test that NtCreateKeyEx() also recursively obtains the Wow6432Node parent.
server: Recursively obtain the Wow6432Node parent.
ntdll/tests: Add some Software\Classes subkey tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/966
This shows that media session samples are correctly oriented, but that mfmediaengine renders them upside down.
--
v3: mfmediaengine: Remove vertical flipping of video frames.
mfmediaengine/tests: Check IMFMediaEngine_TransferVideoFrames output orientation.
mfmediaengine/tests: Pass a device and output format to create_media_engine.
mf: Avoid clearing media session command list while it is running.
mf/tests: Check sample grabber RGB / NV12 orientation.
mf/tests: Factor test grabber callback implementations.
https://gitlab.winehq.org/wine/wine/-/merge_requests/874
This sequence of patches fixes numerous corner cases in CoMsgWaitForMultipleHandles, particularly around the exact sequence in which signaled handles, windows messages, and APCs are considered and which "win" if more than one thing has happened at a time.
This was previously submitted quite some time ago, and rejected as "Needs splitting": https://www.winehq.org/pipermail/wine-devel/2020-November/177529.html
Sorry it has taken me so long to get back to this one, but here's an attempt to tease it apart into a number of smaller commits that each make smaller changes and add some of the new tests. Hopefully that makes it easier to follow which change fixes what. Apologies if the splitting is still a little tortured in places, since it re-thought all at once and then split apart, not developed in this order and then squashed. But hopefully this is more readable.
Major fixes are:
- closes a race condition with short/zero timeouts, in which it could reports RPC_S_PENDING without ever even checking the handles
- cancellation via IMessageFilter::PendingMesage -> `PENDINGMSG_CANCELCALL` now actually exits the wait
- makes sure not to pump additional messages after the handles have been signaled
- don't use a MsgWait until after seeing that handles were not already signaled. This is mostly important to COWAIT_WAITALL.
It's still not advisable to use COWAIT_WAITALL in an STA (for reasons all our favorite Microsoft Gurus have discussed: https://learn.microsoft.com/en-us/archive/blogs/larryosterman/things-you-sh…https://devblogs.microsoft.com/oldnewthing/20060127-17/?p=32493). But it gets fixed in passing as a consequence of the previous changes, and so there are some new conformance tests to show that the new behavior matches windows.
There's also a some new `todo_wine` tests for spurious calls to IMessageFilter_MessagePending. This behavior has *not* changed, but I expanded the test coverage (unsuccessfully) hoping it would give me a hint about what should change. Since I still don't know what the rules should be, I left the new tests `todo_wine`. But maybe they'll be a useful hint someday.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/969
I'm going to need to add a few more compressed formats, WMV which is straightforward, but also AAC (so MPEG v2/v4 audio), and I think wg_format could be cleaned up a bit like this beforehand.
Then, AAC could either be added as a separate `AUDIO_MPEG4` format, or, with an version field, to the (renamed) `AUDIO_MPEG` format, though it doesn't share any of the current `AUDIO_MPEG1` properties. FWIW GStreamer caps is `audio/mpeg` for both, with an `mpegversion` that can be 1, 2 or 4. Could be very well added as `AUDIO_AAC` too, I don't really mind.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/937
This should speedup regedit tests from ~60s to ~4s.
--
v2: regedit.exe: Add a direct import for shcore.
regedit.exe: Call InitCommonControls after command-line has been processed.
shcore: Use delay import for user32 and ole32.
makedep: Link with imported libs before delay imported libs.
makedep: Link default imports separately from direct imports.
makedep: Add an import type parameter to add_import_libs.
https://gitlab.winehq.org/wine/wine/-/merge_requests/964
--
v4: mshtml: Silence a FIXME when parameter is missing.
mshtml: Allocate events via event type.
mshtml: Expand event_info to include a special entry for EVENTID_LAST.
mshtml: Use actual Gecko event type for MessageEvent and StorageEvent.
mshtml: Implement url prop for StorageEvent.
include/mshtml: Move some forward interface declarations to match Windows SDK.
mshtml: Override document.URL's name when adding it from the mshtml typelib.
https://gitlab.winehq.org/wine/wine/-/merge_requests/856
__wine_dbg_output accumulates the output characters in a debug_info
structure, flushing it when it encounters '\n'. If debug_info plus the
new string exceed 1024 characters, append_output will print
> wine_dbg_output: debugstr buffer overflow
and then crash the process via abort().
wine_dbgstr_variant limits the length printed for any individual argument,
but a function with multiple parameters can still plausibly exceed 1024.
Fixed by formatting the TRACE for each argument on a separate line,
as similar places (like oleaut32/typelib.c:dump_DispParms) do.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/958
To avoid direct callbacks from display drivers to win32u while changing display settings.
--
v3: winemac.drv: Resize desktop window on WM_DISPLAYCHANGE message.
winex11.drv: Resize desktop window on WM_DISPLAYCHANGE message.
win32u: Send WM_DISPLAYCHANGE message to the desktop window.
winex11.drv: Send WM_X11DRV_CLIP_CURSOR_REQUEST message from the deskop.
winex11.drv: Sync window positions in a WM_X11DRV_DESKTOP_RESIZED message.
https://gitlab.winehq.org/wine/wine/-/merge_requests/944
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=15679
See Also
* https://bugs.winehq.org/show_bug.cgi?id=9158
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/951
It's possible for a proxy to be released during the middle of an Invoke.
A specific scenario where this happened was a single-shot event sink
which, upon receiving the event it was waiting for, would immediately
call DispEventUnadvise. This removed the proxy pointing to that sink
from the connection point's list of subscribers and released it.
For such cases all state used to complete the Invoke must be owned by
the __proxy_frame kept on the stack; after calling NdrProxySendReceive
(which pumps STA messages and permits reentrancy), anything inside
*This could be use-after-free. MIDL_STUB_MESSAGE already had its own
IRPCChannelBuffer *pRpcChannelBuffer, but lacked its own refcount.
When this does crash, the exception is caught by RpcTryFinally, but
still leads to leaks since NdrProxyFreeBuffer wasn't able to call
IRPCChannelBuffer::FreeBuffer. To fix this, StdProxy_GetChannel() now
calls AddRef() when setting __proxy_frame::_StubMsg::pRpcChannelBuffer
and NdrProxyFreeBuffer() calls the corresponding Release().
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/957
When the destination file cannot be copied in 32 bit installer of 64 bit dlls (going to system32) temporary file attempted at system32 (as that is the destination directory) currently ends up in syswow64. When wineboot is later processing PendingFileRenameOperations the redirection of the source file is not performed (and there is no way to guess that the file was redirected).
--
v2: msi: Disable FS redirection for temporary file in cabinet_copy_file().
https://gitlab.winehq.org/wine/wine/-/merge_requests/945
Add the ability to disconnect nested node providers, and return element properties for nested nodes.
--
v5: uiautomationcore: Add UIAutomationType_Element property support for nested node providers.
uiautomationcore: Implement UiaDisconnectProvider.
uiautomationcore: Track all HUIANODEs returned from the provider thread.
uiautomationcore: Don't use nested node providers for same-thread HWNDs.
https://gitlab.winehq.org/wine/wine/-/merge_requests/908
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=9158
--
v6: ntdll: Implement storing DOS attributes in NtCreateFile.
ntdll: Implement retrieving DOS attributes in NtQueryInformationFile
ntdll: Implement storing DOS attributes in NtSetInformationFile.
ntdll: Implement retrieving DOS attributes in [fd_]get_file_info().
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
This series includes several improvements in DbgHelp for supporting
(global / file static / function static) variables.
In more details:
- correct distinction and hierarchy attributes for the three kinds
(Dwarf and PDB)
- better filtering of PDB information
+ dropping invalid variable definitions from incremental linker
(hence preventing their use instead of the valid ones)
+ keeping more wanted variables in case of collision (by address
or by name)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/950
mingw-w64 defines __forceinline (and therefore FORCEINLINE) as
"extern __inline__ __attribute__((__always_inline__,__gnu_inline__)). This means
that COM inline wrappers specify multiple storage classes and hence cannot be
compiled.
Wine defines FORCEINLINE simply as "inline" (and uses "static" everywhere), so
this is a non-issue for Wine. However, since Wine and mingw-w64 share the source
code of widl and of most IDL headers, this patch changes the definition for both
projects.
There's no reason to force inlining here, especially since the wrappers need to
be manually enabled, and we don't need to match PSDK semantics where these
wrappers don't even exist.
In practice, use "__inline__" instead of "inline" for GNU C targets, to preserve
compatibility with C89 in mingw-w64 headers.
--
v2: widl: Generate "static inline" instead of "static FORCEINLINE" for COM inline wrappers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/935
To avoid direct callbacks from display drivers to win32u while changing display settings.
--
v2: winemac.drv: Resize desktop window on WM_DISPLAYCHANGE message.
winex11.drv: Resize desktop window on WM_DISPLAYCHANGE message.
win32u: Send WM_DISPLAYCHANGE message to the desktop window.
winex11.drv: Send WM_X11DRV_CLIP_CURSOR_REQUEST message from the deskop.
winex11.drv: Sync window positions in a WM_X11DRV_DESKTOP_RESIZED message.
https://gitlab.winehq.org/wine/wine/-/merge_requests/944
--
v2: comtl32: Don't pass PROPSHEETPAGE to SetWindowSubclass in PROPSHEET_CreatePage.
comctl32/tests: Test passing PropertySheetPage as HPROPSHEETPAGE.
comctl32/tests: Add more PROPSHEETPAGE tests inside callback.
comctl32/tests: Test passing extra data in PROPSHEETPAGE structure.
comctl32/tests: Test PROPERTYSHEETPAGE passed in WM_INITDIALOG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/932
When the destination file cannot be copied in 32 bit installer of 64 bit dlls (going to system32) temporary file attempted at system32 (as that is the destination directory) currently ends up in syswow64. When wineboot is later processing PendingFileRenameOperations the redirection of the source file is not performed (and there is no way to guess that the file was redirected).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/945
mingw-w64 defines __forceinline (and therefore FORCEINLINE) as
"extern __inline__ __attribute__((__always_inline__,__gnu_inline__)). This means
that COM inline wrappers specify multiple storage classes and hence cannot be
compiled.
Wine defines FORCEINLINE simply as "inline" (and uses "static" everywhere), so
this is a non-issue for Wine. However, since Wine and mingw-w64 share the source
code of widl and of most IDL headers, this patch changes the definition for both
projects.
There's no reason to force inlining here, especially since the wrappers need to
be manually enabled, and we don't need to match PSDK semantics where these
wrappers don't even exist.
In practice, use "__inline__" instead of "inline" for GNU C targets, to preserve
compatibility with C89 in mingw-w64 headers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/935
WS_EX_APPWINDOW is sort of the opposite to WS_EX_TOOLWINDOW and is supposed to force the window into taskbar. My testing on Windows shows that (WS_EX_TOOLWINDOW | WS_EX_APPWINDOW) windows are visible in both taskbar and task switcher.
Some games use this combination of styles for their windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/947
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=9158
--
v5: ntdll: Implement storing DOS attributes in NtCreateFile.
ntdll: Implement retrieving DOS attributes in NtQueryInformationFile
ntdll: Implement storing DOS attributes in NtSetInformationFile.
ntdll: Implement retrieving DOS attributes in [fd_]get_file_info().
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=9158
--
v4: ntdll: Implement storing DOS attributes in NtCreateFile.
ntdll: Implement retrieving DOS attributes in NtQueryInformationFile
ntdll: Implement storing DOS attributes in NtSetInformationFile.
ntdll: Implement retrieving DOS attributes in [fd_]get_file_info().
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=9158
--
v3: ntdll: Implement storing DOS attributes in NtCreateFile.
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
This effort is part of a larger project I have been working on to get Msys2 and Cygwin working properly on Wine. The absence of DOS fule attribute support prevents one of the modes that Cygwin and Msys2 can use to emulate symbolic links from working correctly, which causes the Cygwin installer to fail: https://bugs.winehq.org/show_bug.cgi?id=9158
--
v2: ntdll: Implement storing DOS attributes in NtCreateFile.
ntdll: Implement retrieving DOS attributes in NtQueryInformationFile
ntdll: Implement storing DOS attributes in NtSetInformationFile.
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
Ok, then I assume you'll revert it in today's push? We can abandon this MR, since the subject (my change to VariantCopyInd) is disproved anyway. I'll try to salvage the tests and open a separate MR for the discovered leak once I actually have a fix, but I think I'm going to prioritize finishing some other items first.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/897#note_9458
On Tue Sep 27 20:16:37 2022 +0000, Esme Povirk wrote:
> I really don't think this needs to be a pointer. If there's going to be
> at most 1 entry per uia_node, and it doesn't need to outlive the
> uia_node, you can put the entry in there directly.
> You can use list_init() when creating uia_node and list_empty() to check
> if the entry is being used. (Though list_remove will leave the entry in
> an invalid state, and you'll have to init it again if you want that
> check to work afterwards.)
That'd make sense. I guess we could also apply this to `node_map_list_entry`, and rather than have custom list entry structures for each, just use the `struct uia_node` structure to store the information we need instead.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/908#note_9457
Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_private.h:
>
> HWND hwnd;
> BOOL nested_node;
> + struct list *prov_thread_list_entry;
I really don't think this needs to be a pointer. If there's going to be at most 1 entry per uia_node, and it doesn't need to outlive the uia_node, you can put the entry in there directly.
You can use list_init() when creating uia_node and list_empty() to check if the entry is being used. (Though list_remove will leave the entry in an invalid state, and you'll have to init it again if you want that check to work afterwards.)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/908#note_9455
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n… by Erich E. Hoover (@ehoover), and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These can implemented in various ways depending upon the capabilities of the operating system and the file system. However, this initial patch-set focusses on just one method: Samba-formatted Extended File Attributes.
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value, and this patch-set implements a compatible mechanism.
Support for additional storage methods to increase operating system and filesystem compatibility is planned for later patch submissions.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/946
`mscomctl.ocx` (part of the VB6 common controls) calls `HeapCreate(0x04000000,1,0)`, that flag is the old and undocumented `HEAP_SHARED`.
`HEAP_CreateSystemHeap()` tries to map memory at `0x80000000`, this fails on Wow64 (and probably should for all 32-bit platforms for non-LAA EXEs).
As a workaround, map the memory anywhere if it fails at `0x80000000`.
I wasn't able to find much documentation about `HEAP_SHARED`, it dates back to Win9x and I guess Wine may have needed it for some native DLLs.
It's not clear whether modern Windows really implements any shared heap functionality any more, every 'shared' heap created returns a different pointer (even in the same process). Maybe Wine should remove the functionality too?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/920
In the ntdll file handling code, there are currently two duplicated file info setting functions: `get_file_info` and `fd_get_file_info`. One pasted on path strings, and the other based on file descriptors respectively. This patch set simplifies the code by unifying both functions into a single function ~~powered by `fstatat` instead of `lstat` and `fstat`~~.
--
v2: ntdll: Unify get_file_info and fd_get_file_info.
https://gitlab.winehq.org/wine/wine/-/merge_requests/942
Changes since last MR:
- Store list entry inside of `struct uia_node` instead of doing linear search for removal.
- Replace `WARN` with `ERR` if provider thread shuts down with nodes still in the provider thread list.
- Use `wine/rbtree.h` for looking up HUIANODEs by runtime ID.
- Get rid of `struct uia_node *container_node` inside of `struct uia_provider`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/943
Add the ability to disconnect nested node providers, and return element properties for nested nodes.
--
v2: uiautomationcore: Add UIAutomationType_Element property support for nested node providers.
uiautomationcore: Implement UiaDisconnectProvider.
uiautomationcore: Track all HUIANODEs returned from the provider thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/908
In the ntdll file handling code, there are currently two duplicated file info setting functions: `get_file_info` and `fd_get_file_info`. One pasted on path strings, and the other based on file descriptors respectively. This patch set simplifies the code by unifying both functions into a single function powered by `fstatat` instead of `lstat` and `fstat`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/942
> ...
>
> My gut is that if extended attributes are "universal enough"
> (and usable enough), and we can easily implement DOS attributes over
> them, modulo slight differences in the API, then there isn't really any
> need to implement something truly portable. I could be wrong about this,
> though.
What platforms do you consider to be important here? I ask because the current implementation (without fallback) supports Linux, Mac OS, FreeBSD, and NetBSD. That seems to me to be the "important" ones.
> > There is also the storage of [NT extended-attribute (EA)](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/n…) values to consider, when we move toward a non-stub implementation of this feature.
> >
> > Perhaps it would be preferable to produce a design that can be encompass all these issues.
The NTFS spec separates DOS Attributes (Flags) from Extended Attributes (EA). I would not recommend mixing the two, for fear of an accidental name collision. If you want to design a fallback mechanism that supports both of these features the same way, then I would suggest structuring it like so:
```
.WINE_METADATA/<filename>/<feature>
```
That way when a copy/move operation is performed on a file then it's easier to copy both features together.
> I don't have a good read on this, personally. I suppose it at least
> partly depends on whether NT extended attributes are used by any
> program. I'm at least not aware of any usage?
I am not aware of any non-MS usage, but it is documented. So, I would not be surprised if some copy protection mechanism does something with it our chooses to do so at some point in the future. I do know that the Single Instance Storage (SIS) minifilter driver uses an extended attribute to "back reference" the single instance files to find the duplicates/originals.
> I think working out the design completely before submitting any patches
> would probably be a good idea.
>
> ...
If the OS list above is sufficient then I think we're covered, if we need a fallback implementation then this probably needs a little more thought.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/924#note_9410