-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace FileSaveDialogRCW and FileOpenDialogRCW with manual creation of COM object #4940
Comments
Are these the only ones? I'd have thought WinForms uses more CoClasses but maybe I'm mistaken. It'd always be possible to call Looking at the thread you linked it starts with
Is this still true? (I did not read through the whole thread) There's definitely more COM usage in WinForms than just CoClass object creation. |
COM support implemented, at least a lot of controls working. Some issues on NativeAOT front with marshalling, but overall Winforms + NativeAOT story looks promising. CoClass declared in 3 places only
winforms/src/System.Windows.Forms/src/System/Windows/Forms/OpenFileDialog.NativeFileOpenDialog.cs Line 14 in d46ad2e
winforms/src/System.Windows.Forms/src/System/Windows/Forms/SaveFileDialog.NativeFileSaveDialog.cs Line 14 in d46ad2e
Newing happens just for |
CoClass attribute doesn't need to be declared for a class to be a CoClass, so searching for it won't find all CoClasses used by WinForms. I'm wondering what part isn't implemented, the CoClass attribute semantic (being able to call |
@kant2002 thank you for raising this issue, and feel free to raise more as you find those. The way things are panning out I can't see us making any strides in resolving this in .NET 6.0 timeframe, so marking it as "future" work. |
@RussKie I have simple ComWrappers which suite my needs, just these two pieces not working. Can this be community-led effort with some guidance from team? Technically let me create PR to show what minimal amount I want. If it take more testing and other unknown efforts from you, I understand that this may be abandoned. |
Absolutely! Maybe open a draft PR where you can show your proposal and we can discuss the approach. We'll try to muster the necessary experts, and guide you through the process. |
Currently NativeAOT does not support
CoClass
and have not plans for that for now. That's not direct statement, but I think it would be better fix here then add support in NativeAOT.The text was updated successfully, but these errors were encountered: