Clickbait title isn’t really accurate. You’ve always had this ability by using P/Invokes, but it’s never been easy. It requires a lot of domain knowledge (or copy-pasta that may cause other problems) to actually get it to work. It’s also very easy to get wrong and cause big memory leaks in the unmanaged heap.<p>Over the years I’ve managed to get pretty good at P/Invokes to the point where I don’t bat an eye when I need to do some interop with native code. That doesn’t mean I don’t sometimes run into a particularly finicky API that requires digging deep into stuff like GC pinning, structure packing, fixed pointers, or other challenges that will grind things to a halt while I debug what’s happening. At least I’ve come to the point where I can look at unexpected API behavior and have a good intuition for what I need to do.<p>It sucks, a lot.<p>I’m really glad that there’s finally an official and reusable abstraction to make this simpler in the future.
The first two paragraphs are wrong, aren't they? My understanding is that the "32" in Win32 was originally to distinguish 32 bit from 16 bit API calls, but now its just the generic name for the Windows API.<p>The article makes it sound like the change is only of interest if you're compiling 32-bit applications.
It's funny to see MS do this after all those years of messing around with various other bloaty UI frameworks... and further reaffirms my decision to stay with pure Win32.<p>Perhaps MS is encouraging developers to native UI after all.
There is a performance penalty when accessing APIs over WinMD and that is acceptable when you're only using them sparingly.
I'd be curious how using Win32 APIs over WinMD performs instead of using PInvoke or FFI.<p>Edit: Here is the actual project if anyone is interested in following along. <a href="https://github.com/microsoft/win32metadata/" rel="nofollow">https://github.com/microsoft/win32metadata/</a>
This is awesome news. We need platforms to be language agnostic. The best way to do this it to make it possible to query the entire API so that you can automate the warping of other languages.<p>Apples Coca APIs can be queried, and at one point i considered writing a C API generator. My guess it would take a week or two, but at the time I was busy and spending 2 weeks in XCode, wasn't really my idea of good time. Some one should do it.
Microsoft should bite the bullet and simply create another operating system, created from scratch. They have the experience and the know how to avoid all the mistakes. Offer them in parallel, keep a virtual machine (an Wine equivalent if you want) that would run Windows programs and overall simplify the API's while only the new one would receive new developing. And in 10 years Windows would be history. I know it won't happen but once can only dream though.
For widgets and windows... I prefer to use GTK, which has a much easier learning curve, and works on multiple platforms, and works well with HiDPI.<p>Win32 uses hungarian notation, which is not common these days. The thing was designed for a time in which programming tools had almost no autocompletion and were slightly better than a text editor.