MS making Win32 api available in other languages

  • Release Candidate 6
    Guest:
    We are at a “proposed final” true release candidate with nothing known remaining to be changed or fixed. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
    /Steve.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

    /Steve.

coffeeprogrammer

Well-known member
Jul 19, 2021
116
11
Does anyone have more details on this than just what it says in the article? A few months ago I tried writing to the Win32 api in masm and it was kinda of fun and I felt like I could learn alot of the apis and windows things in the process. I was taking a break from C# coding, when I got to the sd times I found this article. I found it kinda of interesting.

 
Most mature languages have a way to call OS specific code, such as the Windows API. Usually it's some sort of external definition. It appears that what is going on here is that MS is publishing ( https://www.nuget.org/packages/Microsoft.Windows.SDK.Win32Metadata/17.0.2-preview ) the WinAPI in a specific format ( https://www.ecma-international.org/publications-and-standards/standards/ecma-335/ ) that can be parsed by user written tools to generate code (or header files, or packages, or whatever is needed) to allow access to WinAPI from languages they don't directly support (as well as the three they do support: C#, C++, Rust.) You can see some of them on the GitHUB page https://github.com/microsoft/win32metadata (right now there is D Lang, Dart and Zig.)

If one wanted, one could support Assembly by generating some macros/functions to wrap calls to these Windows APIs. That ofc would be somewhat antithetical to the small is better mantra of Assembly, but time to code matters too, IMHO.