[Bug 57476] New: Missing [out] attributes in dwrite.idl
https://bugs.winehq.org/show_bug.cgi?id=57476 Bug ID: 57476 Summary: Missing [out] attributes in dwrite.idl Product: Wine Version: 9.22 Hardware: x86-64 OS: Windows Status: UNCONFIRMED Severity: normal Priority: P2 Component: dwrite Assignee: wine-bugs(a)winehq.org Reporter: thomas_linder_puls(a)hotmail.com Created attachment 77487 --> https://bugs.winehq.org/attachment.cgi?id=77487 updated dwrite.idl file The dwrite.idl file lacks [out] attributes. I don't know whether your IDL tool understands that attribute, but it makes are huge difference for my usage with Microsoft's IDL compiler. I have added them for you :-) in the attachment. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de --- Comment #1 from Fabian Maurer <dark.shadow4(a)web.de> --- What exactly does this attribute change? In Wine, it leads to the same header as without, and The Windows SDK only comes with dwrite.h, not idl. FWIW, you can submit a MR at https://gitlab.winehq.org/groups/wine/-/merge_requests -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #2 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- (If Windows SDK provided an idl file I would never have found yours). I use the file to create a type library dwrite.tlb with Microsofts IDL compiler. Which is unfortunately also not in the SDK. For my programming language (Visual Prolog) I have a tool that can read such type libraries and generate code for using such COM objects. And for the tool to generate that code correctly it is important to know whether an argument is input or output. I am fully aware that C++ is completely indifferent to such things and leaves all the handling to the programmer. I will see if I can figure out to make a merge request but I have tried that before and at that time it wouldn't accept a hotmail email account. And that stopped me. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #3 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- That is still a problem: Email is not allowed for sign-up. Please use your regular email address. Check with your administrator. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #4 from Nikolay Sivov <bunglehead(a)gmail.com> --- That's an unexpected use case. I don't think it would be a problem to have annotations, but using dwrite header for a typelib is not going to get very far, I suspect. Using dwrite_1.idl will already produce duplicate method names, I don't think that's allowed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #5 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- dwrite_1.idl did not exist when I made the mentioned updates. I have not tried using it, but it includes dwrite.idl and I did not (in a quick glance) notice any name clashes. Maybe someday I will also need _1 _2 and _3 and have to update them as well. Anyway, it is not a big issue I have the updated file and I am probably also the only one that needs the update. I just thought that this information could "flow " back to you. If nothing else then just to be a little closer to the "truth". I am sure Microsoft have a corresponding file with such annotations; they just don't publish it. I asked them to publish similar information for the webView2 control, which they then included in the published file set. But that was while promotion of the control was in the early phases where there are still "real ears" to listen to your requests/suggestions/ideas. It is much more difficult to convince them about an ancient file (Sorry, that was a sidetrack :-)). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> --- One example is CreateCustomRenderingParams(), same method name is used in both IDWriteFactory and IDWriteFactory1. I expect midl won't be able to digest that. Windows SDK does not provide idls for those files, and headers it does provide are not going to work with C code, that applies for Direct2D headers too. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #7 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- I believe the MIDL compiler can deal with that (just as C++ can). But I agree that it is "unlike" Microsoft's normal approach both to reuse the name and also to name the second interface IDWriteFactory1 (normally the first one would be IDWriteFactory and the second one IDWriteFactory2). It is also not a problem in our language since the two methods have different number of arguments. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #8 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Nikolay Sivov from comment #6)
Windows SDK does not provide idls for those files, and headers it does provide are not going to work with C code, that applies for Direct2D headers too.
There's no such a problem with D2D headers in PSDK. I've attached a test application to the bug 57435 that compiles with PSDK headers however Wine headers are broken in that respect. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #9 from Nikolay Sivov <bunglehead(a)gmail.com> --- What's broken in wine headers? I don't see method macros like ID2D1Factory1_CreateDCRenderTarget() from your test in current SDK 10.0.26100. So how does it work there? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #10 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Nikolay Sivov from comment #9)
What's broken in wine headers?
I don't see method macros like ID2D1Factory1_CreateDCRenderTarget() from your test in current SDK 10.0.26100. So how does it work there?
It looks like that macro was removed in PSDK 10.0, versions 7.1A, 8.0 and 8.1 do have it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Missing [out] attributes in |Methods arguments |dwrite.idl |attributes are missing from | |dwrite.idl -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #11 from Nikolay Sivov <bunglehead(a)gmail.com> --- Hi, Thomas. Please retest with current wine-git, https://gitlab.winehq.org/wine/wine/-/merge_requests/7020 was merged, and it adds attributes for all the methods. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #12 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- The [out] for the "sink" in IDWriteTextAnalyzer::AnalyzeLineBreakpoints should be [in]. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #13 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- Another thing: It is not customary to use the [in] attribute since it is default. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #14 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- (I will correct myself on the matter of [in] it seems that Microsoft uses it "sometimes" and "sometimes not"). Furthermore I have spotted one more mistake: IDWriteTextAnalysisSink::SetNumberSubstitution the 'substitution' parameter is [in]. I see that you have found and added many more output parameters that I had, thank you very much for that :-). I also see in dwrite.h in the SDK that it is possible to reverse-engineer the parameters from that file (but that is hard work). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #15 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- Sorry for "dripping" this. But I have found two more problems. For simplicity for you this is all four: IDWriteTextAnalysisSink (substitution): HRESULT SetNumberSubstitution( [in] UINT32 position, [in] UINT32 length, [in] IDWriteNumberSubstitution* substitution ); IDWriteTextAnalyzer (sink): HRESULT AnalyzeLineBreakpoints( [in] IDWriteTextAnalysisSource *source, [in] UINT32 position, [in] UINT32 length, [in] IDWriteTextAnalysisSink *sink ); IDWriteFactory (params & analyzer): HRESULT CreateCustomRenderingParams( [in] FLOAT gamma, [in] FLOAT enhancedContrast, [in] FLOAT cleartype_level, [in] DWRITE_PIXEL_GEOMETRY geometry, [in] DWRITE_RENDERING_MODE mode, [out] IDWriteRenderingParams **params ); HRESULT CreateTextAnalyzer( [out] IDWriteTextAnalyzer **analyzer ); -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #16 from Nikolay Sivov <bunglehead(a)gmail.com> --- Thanks a lot, I submitted this as https://gitlab.winehq.org/wine/wine/-/merge_requests/7086. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #17 from Nikolay Sivov <bunglehead(a)gmail.com> --- Please check once more, this should be fixed now with 455360de45f96b0b0c7930e0aedf6dbe6975df1d. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 --- Comment #18 from Thomas Linder Puls <thomas_linder_puls(a)hotmail.com> --- Yes, it is fine now :-). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |455360de45f96b0b0c7930e0aed | |f6dbe6975df1d Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #19 from Fabian Maurer <dark.shadow4(a)web.de> --- Marking fixed then. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57476 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #20 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.0-rc5. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla