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@winehq.org Reporter: thomas_linder_puls@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.
https://bugs.winehq.org/show_bug.cgi?id=57476
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@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
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #2 from Thomas Linder Puls thomas_linder_puls@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.
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #3 from Thomas Linder Puls thomas_linder_puls@hotmail.com --- That is still a problem: Email is not allowed for sign-up. Please use your regular email address. Check with your administrator.
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #4 from Nikolay Sivov bunglehead@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.
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #5 from Thomas Linder Puls thomas_linder_puls@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 :-)).
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #6 from Nikolay Sivov bunglehead@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.
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #7 from Thomas Linder Puls thomas_linder_puls@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.
https://bugs.winehq.org/show_bug.cgi?id=57476
--- Comment #8 from Dmitry Timoshkov dmitry@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.