Salvage tests and fix a leak found in another review: see https://gitlab.winehq.org/wine/wine/-/merge_requests/897#note_9175 points 1 and 2. 3. is why !897 was reverted.
This does not contain the (incorrect) changes to VariantCopyInd, but instead fixes the leak identified in VariantClear (VT_RECORD needs to free pvRecord), and the wrong allocator being used in VariantCopy (it should have been IMalloc, rather than `HeapAlloc`, as shown by the fact IMallocSpy observes these allocations).
This also cleans up some dubious behavior by the test IRecordInfoImpl, which was modifying a VARIANT that it did not own or receive as an argument in the middle of VariantClear. This was likely undefined behavior, and in any case concealed the heap leak.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1035
The Visual Studio 2022 installer needs to be able to lookup a valid
WinMD file for the 'Windows.Networking.Connectivity' namespace
in order for the installation to start.
A normal Windows installation contains lots of individual
'.winmd' files (e.g. 'Windows.Networking.winmd'), which we
cannot redistribute. Fortunately, Microsoft provides an open-source
project called 'windows-rs', which contains a combined 'Windows.winmd'
file that is explicitly MIT-licensed:
https://github.com/microsoft/windows-rs/blob/master/crates/libs/bindgen/def…
Make RoResolveNamespace resolve anything starting with 'Windows' by just
pointing to this giant file. A full implementation will require us to
actually walk the 'WinMetadata' directory (if the caller provides
a custom path) and parse the matched '.winmd' file. However, this
implementation is good enough for Visual Studio 2022
To actually run the vs2022 installer, a patch for
the SHELL_execute trailing-space bug https://bugs.winehq.org/show_bug.cgi?id=56940
is needed: https://gitlab.winehq.org/wine/wine/-/merge_requests/6079
--
v2: wintypes: Partially implement RoResolveNamespace and add 'Windows.winmd'
https://gitlab.winehq.org/wine/wine/-/merge_requests/6288