You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before anything gets too deep, the Winforms team should decide on how they want to split up the NativeMethods.txt file.
Not sure how we'd want to split this up in ways that make sense given everything going to one class. Any ideas are certainly welcome.
Note that this is currently a prototype effort targeting .NET 8. We have an intern working on this (@fernandanavamoya) with support from myself and our returning @lonitra.
AFAIK, each NativeMethods.txt file needs to be in its own folder and added to additionalfiles. So in the context of winforms, we can place a NativeMethods.txt in each library sub folder. That way each library has its own NativeMethods.txt.
Another way is have a single file, but add a comment "header" for each separate library.
I like the idea of separate files as the management is per library.
Its even more simple if winforms is using every method in a library, we can add them via a single wildcard line. Although, I am unsure if Trimming could then remove the used methods afterwards.
Personal opinion: I like how we have separation per containing dll (i.e., Interop.User32, Interop.Gdi32, etc). It'd be great to retain the separation if possible, e.g., /User32/NativeMethods.txt, /Gdi32/NativeMethods.txt, /Kernel32/NativeMethods.txt, etc.
AFAIK, each NativeMethods.txt file needs to be in its own folder and added to additionalfiles. So in the context of winforms, we can place a NativeMethods.txt in each library sub folder. That way each library has its own NativeMethods.txt.
Personal opinion: I like how we have separation per containing dll (i.e., Interop.User32, Interop.Gdi32, etc). It'd be great to retain the separation if possible, e.g., /User32/NativeMethods.txt, /Gdi32/NativeMethods.txt, /Kernel32/NativeMethods.txt, etc.
I'll proceed on this basis. It seems easier to deal with.
So @AArnott suggests we keep a centralized NativeMethods.txt and not split it up. The splitting up was designed for shared project scenarios. Which makes sense.
I will adjust my PR to move it back to the main NativeMethods.txt as this will allow better management.
10 remaining items
ghost added a commit that references this issue on Aug 26, 2022
I'm officially going to tag this for .NET 9, for whatever bits remain after .NET 8. I think we're past where we want to do more in this release, but let's keep going! 😄
Activity
elachlan commentedon Jul 19, 2022
@JeremyKuhne I have created an issue here to help centralize issues/information around CSWin32.
Before anything gets too deep, the Winforms team should decide on how they want to split up the NativeMethods.txt file.
JeremyKuhne commentedon Jul 19, 2022
Not sure how we'd want to split this up in ways that make sense given everything going to one class. Any ideas are certainly welcome.
Note that this is currently a prototype effort targeting .NET 8. We have an intern working on this (@fernandanavamoya) with support from myself and our returning @lonitra.
elachlan commentedon Jul 19, 2022
I have asked the CsWin32 team about the
NativeMethods.txtin microsoft/CsWin32#606.AFAIK, each
NativeMethods.txtfile needs to be in its own folder and added to additionalfiles. So in the context of winforms, we can place aNativeMethods.txtin each library sub folder. That way each library has its ownNativeMethods.txt.Another way is have a single file, but add a comment "header" for each separate library.
I like the idea of separate files as the management is per library.
Its even more simple if winforms is using every method in a library, we can add them via a single wildcard line. Although, I am unsure if Trimming could then remove the used methods afterwards.
elachlan commentedon Jul 19, 2022
@JeremyKuhne do you want all the generated code in one file? If not, you can use the following in NativeMethods.json
RussKie commentedon Jul 19, 2022
Personal opinion: I like how we have separation per containing dll (i.e., Interop.User32, Interop.Gdi32, etc). It'd be great to retain the separation if possible, e.g., /User32/NativeMethods.txt, /Gdi32/NativeMethods.txt, /Kernel32/NativeMethods.txt, etc.
RussKie commentedon Jul 19, 2022
👍
elachlan commentedon Jul 19, 2022
I'll proceed on this basis. It seems easier to deal with.
elachlan commentedon Jul 19, 2022
So @AArnott suggests we keep a centralized NativeMethods.txt and not split it up. The splitting up was designed for shared project scenarios. Which makes sense.
I will adjust my PR to move it back to the main NativeMethods.txt as this will allow better management.
10 remaining items
Remove unused enums (#7671)
Remove unused enums (#7671)
Remove unused enums (dotnet#7671)
Remove unused enums (#7671)
merriemcgaw commentedon Jul 27, 2023
I'm officially going to tag this for .NET 9, for whatever bits remain after .NET 8. I think we're past where we want to do more in this release, but let's keep going! 😄
willibrandon commentedon Dec 6, 2023
Is the plan to convert the remaining Ole32 functions and Shell32 interfaces to CsWin32?
elachlan commentedon Dec 6, 2023
@willibrandon it's been slowly happening. I think it's a lot of com wrapper stuff left.
willibrandon commentedon Dec 7, 2023
@elachlan - I'm curious what that will look like, and will keep an eye out, thanks.
JeremyKuhne commentedon Jul 24, 2024
Everything has been moved now.