Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v12: dlls/oleaut32: Invert if-stmt in ITypeLib2_fnRelease()
dlls/oleaut32: Consistently use GetTypeInfoCount()
dlls/oleaut32: Fix return value on ITypeComp_fnBindType
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
This is a cleanup in preparation for !7. Originally, !7 extended the use of `current_modref`, but I think we could avoid that with a more direct approach. Most of these changes are no-ops.
For the relay handler, we no longer treat `GetProcAddress` calls inside `DllMain` as coming from a loaded DLL. I believe this was more of a side effect of how the code was structured rather than an intentional behavior that needs to be preserved.
One more use of `current_modref` remains, which will be removed by !7.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7287
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v11: dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
dlls/oleaut32: Validate arguments in ITypeLibComp interface
dlls/oleaut32: Validate arguments in ITypeComp interface
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v10: dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
dlls/oleaut32: Validate arguments in ITypeLibComp interface
dlls/oleaut32: Validate arguments in ITypeComp interface
dlls/oleaut32: Consistently use TLB_get_bstr()
dlls/oleaut32: Invert if stmt for clarity
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v9: dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
dlls/oleaut32: Validate arguments in ITypeLibComp interface
dlls/oleaut32: Validate arguments in ITypeComp interface
dlls/oleaut32: Consistently use TLB_get_bstr()
dlls/oleaut32: Invert if stmt for clarity
dlls/oleaut32: Fix nonsensical memory access in ITypeLib2_Constructor_SLTG()
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v8: dlls/oleaut32: Fix nonsensical memory access in ITypeLib2_Constructor_SLTG()
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: windowscodecs/metadata: Implement SetValue().
windowscodecs/tests: Add an item enumeration test for the App1 reader.
windowscodecs/metadata: Add initial implementation of CreateMetadataWriterFromReader().
windowscodecs: Filter options in CreateMetadataWriter().
windowscodecs/metadata: Add a stub for WICApp1MetadataWriter.
windowscodecs/metadata: Create nested writer instances when loading IFD data.
windowscodecs: Implement CreateMetadataWriter().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7275
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v7: dlls/oleaut32: Fix nonsensical memory access in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Avoid ptr arithmetic in MSFT_DoVars()
dlls/oleaut32: Avoid ptr arithmetic in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Shink down ITypeLibComp_fnBind() verbosity some
dlls/oleaut32: ptr_size should be a ULONG
dlls/oleaut32: Scope indexer to loops in fn[Is|Find]Name()
dlls/oleaut32: Factor out TLB_get_funcparams_by_name()
dlls/oleaut32: Factor out TLB_get_funcdesc_by_name()
dlls/oleaut32: Validate args of ITypeLib2_fnIsName()
dlls/oleaut32: fn(Is|Find)Name should set szNameBuf with correct case
dlls/oleaut32: Use consistent param identifiers in fnFindName
dlls/oleaut32: Mostly mirror fnFindName impl in typelib.c
dlls/oleaut32: Use common and correct identifiers in typelib.c
dlls/oleaut32: Consistently use lstrcmpiW() while looking for names
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
Make both method calls;
1. Consistently written with parameter names as per spec.
2. Fix parameter validation to be consistent with spec.
3. Fix szNameBuf parameter semantics as per spec.
4. Fix szNameBuf casing str search as per spec.
5. Factor out common code into TLB_ helpers vastly improves readability.
--
v6: dlls/oleaut32: Fix nonsensical memory access in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Avoid ptr arithmetic in MSFT_DoVars()
dlls/oleaut32: Avoid ptr arithmetic in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Fix GetRefTypeInfo() test
dlls/oleaut32: Shink down ITypeLibComp_fnBind() verbosity some
dlls/oleaut32: ptr_size should be a ULONG
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286
* * *
BTW I did try to create tests to make sure we connect collection the same way Windows does it. Problem is `GUID_ConnectToDLSCollection` is not gettable. Then I tried to create a `IDirectMusicPerformance` implementation and intercept `DownloadInstrument`. Interestingly Windows `IDirectMusicSegment::Download` doesn't call `DownloadInstrument` at all, instead it downloads instruments through a private, undocumented interface. So there seems to be no way to test this.
--
v4: dmimi: Connect default collection to MIDI bandtrack.
dmime: Handle IStream EOF correctly in MIDI parser.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7230
On Fri Feb 7 20:18:51 2025 +0000, Nikolay Sivov wrote:
> What this needs first is tests, and then fixes would could normally
> touch more than just absolute minimum, like having some helpers etc. But
> only renaming local variables is not something we normally do.
Yes, three tests are fixed if you review.
> absolute minimum
That is why commits have been split up to make things trivially clear.
> But only renaming local variables is not something we normally do.
Except it isn't just renaming variables if you actually looked it over.
No offense but this attitude to new contributions explains a lot about why this code is so horrifically inconsistent and in disrepair. There are multiple buffer overflows and deref of invalid ptr's, both of which controllable by the user and other subtle bugs. A few have been addressed here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7286#note_94040