Skip to content

[Tracking] CsWin32 API Change/Add Requests #7468

Closed

Description

@lonitra

In the effort to start using CsWin32 (#7445), there may be APIs we'd like changed or added in cswin32 due to missing typedefs, conveniency, etc. This is a tracking issue to help keep a list of these adds/changes we would like.

Related:

Activity

  1. changed the title [-]CsWin32 Signature Change Requests[/-] [+]CsWin32 Method Signature Change Requests[/+] on Jul 20, 2022
  2. changed the title [-]CsWin32 Method Signature Change Requests[/-] [+][Tracking] CsWin32 Method Signature Change Requests[/+] on Jul 20, 2022
  3. added this to the .NET 7.0 milestone on Jul 21, 2022
  4. changed the title [-][Tracking] CsWin32 Method Signature Change Requests[/-] [+][Tracking] CsWin32 API Change/Add Requests[/+] on Jul 21, 2022
  5. elachlan commented on Aug 5, 2022

    @elachlan
    Contributor

    This would be helpful for SHAutoComplete method.
    microsoft/win32metadata#1027

  6. elachlan commented on Aug 5, 2022

    @elachlan
    Contributor

    This is blocking ImmGetConversionStatus:
    microsoft/win32metadata#1028

  7. modified the milestones: .NET 7.0, .NET 8.0 on Aug 11, 2022
  8. elachlan commented on Aug 21, 2022

    @elachlan
    Contributor

    Just to explain what I have been doing. I have been using ILSpy to check the win32metadata for everything in each of the interop folders. I am doing this so win32metadata is ahead of the winforms team on any differences, making the conversion easier. I am working bottom to top.

    I am creating the issues first and then I will submit PRs based on feedback in the issues. This way the team has known progress to reduce project risk.

    Anyone else wanting to do this is welcome. You can find steps in https://github.com/microsoft/win32metadata/blob/main/CONTRIBUTING.md

  9. elachlan commented on Aug 21, 2022

    @elachlan
    Contributor

    Remaining Interop folders to check:

    • Ole32
    • Mso (Not in win32metadata)
    • Mshtml (Not in win32metadata)
    • Imm32
    • Hhctrl (.ocx, probably not apart of win32metadata?)
    • Gdi32
    • Comdlg32
    • ComCtl32
    • User32
  10. elachlan commented on Aug 21, 2022

    @elachlan
    Contributor

    What do we do with the following interop libraries?

    • Mso (Not in win32metadata)
    • Mshtml (Not in win32metadata)
    • Hhctrl (.ocx, probably not apart of win32metadata?)
  11. lonitra commented on Aug 22, 2022

    @lonitra
    MemberAuthor

    What do we do with the following interop libraries?

    Looping in @JeremyKuhne for further thoughts on this when he's back. For now, we'll proceed with conversions for the other folders.

  12. elachlan commented on Aug 22, 2022

    @elachlan
    Contributor

    I know it sounds a bit silly, but I can't remember if I compared user32 to Win32Metadata. So I just have these to compare and raise issues:

    • Ole32
    • ComCtl32
    • User32

    I should be able to look into it later this week. After that, I will begin work on the PRs.

    For the issues already raised in win32metadata some of them might not be valid. So if the team could verify them, that would be great. It will help reduce any wasted time on PRs that won't be merged.

  13. lonitra commented on Aug 23, 2022

    @lonitra
    MemberAuthor

    For the issues already raised in win32metadata some of them might not be valid.

    Could you clarify what you mean when you say that they might not be valid?

  14. elachlan commented on Aug 23, 2022

    @elachlan
    Contributor

    For the issues already raised in win32metadata some of them might not be valid.

    Could you clarify what you mean when you say that they might not be valid?

    I have done my best to find where the signatures of methods don't match. In some instances like NTSTATUS, an enum was turned down for static fields instead.

    I expect the win32metadata team might turn down a few others.

  15. RussKie commented on Aug 24, 2022

    @RussKie
    Contributor

    Great job @elachlan! Thank you.

  16. elachlan commented on Aug 25, 2022

    @elachlan
    Contributor

    Adding win32metadata issues for User32 is "done". I may have missed a few, but we can pick them up when converting.

  17. elachlan commented on Aug 27, 2022

    @elachlan
    Contributor

    I am done! I have done my best to make sure I have covered everything, but I may have missed something.

    We are going to have difficulties in ComCtl32 because lots of the enums defined in there are not defined in Win32Metadata and might not be added.

    Ole32 has a lot of interface updates. But the conversion doesn't seem as bad.

    The metadata team and winforms team will need to review and discuss the issues I have linked here.

    CC: @sotteson1 and @mikebattista sorry for the issue spam.

  18. mikebattista commented on Aug 27, 2022

    @mikebattista

    Fortunately most of your issues are just with friendly enums which are easy to add.

  19. elachlan commented on Aug 28, 2022

    @elachlan
    Contributor

    The biggest problem winforms will face is the messaging constants. Metadata doesn't group them into enums. Which makes it harder for winforms to consume them. There is a lot to be said for constants though. Since if you only use two of them, then you just import two of them via CsWin32. So the amount of generated code is less.

  20. merriemcgaw commented on Jul 27, 2023

    @merriemcgaw
    Contributor

    @JeremyKuhne is there anything pending from windows on this?

  21. modified the milestones: .NET 8.0, .NET 9.0 on Jul 27, 2023
  22. JeremyKuhne commented on Jul 27, 2023

    @JeremyKuhne
    Member

    There are still a few open issues, and we are probably missing a couple. We'll do another run through to ensure we have all of the open ones tracked.

  23. JeremyKuhne commented on Jul 24, 2024

    @JeremyKuhne
    Member

    I believe most, if not all of these are complete.

  24. locked and limited conversation to collaborators on Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions