UI is tough. Binding is worse. #WinRT #WPF

"Cool API you wanna use there, would be a shame if it doesn't work on half your target systems" - #Microsoft, with the #WinRT PackageManager API.

Fuck you.

#Win32

How?

Type: System.Runtime.InteropServices.COMException
Message:
Stack Trace: at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)
at …
at Windows.ApplicationModel.StartupTask.GetAsync(String taskId)

Why is StartupTask.GetAsync(id) failing.

And why isn't the exception showing the error code?

#Windows #WinRT

Anyone here with #WinRT knowledge?
If I have e.g. com:ComInterface and com4:ComInterface registered, does com4 on supported systems override the com declaration?

#Windows #Win32 #UWP #MSIX

Why is #WinRT / WinMD so much more pain than creating the same in regular #MIDL #COM?

#Win32

Windows Runtime API design principles around read-write properties: Idempotence and self-assignment | by Raymond Chen

https://devblogs.microsoft.com/oldnewthing/20251008-00/?p=111660

#winrt #windowsdev #apidesign #windowssdk #windows #programming

Windows Runtime API design principles around read-write properties: Idempotence and self-assignment - The Old New Thing

Setting it to the value it already has is not a crime.

The Old New Thing

How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 2 | by Raymond Chen.

https://devblogs.microsoft.com/oldnewthing/20250904-00/?p=111557

#cpp #winrt #async #programming #windowsdev #windowssdk

How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 2 - The Old New Thing

Safer smuggling.

The Old New Thing
Because the iid of a generic interface in the #WinRT type-system is the uuid5 of it's signature, we can brute-force the layout of `SendDataProgress` by matching against the known iid (40772286-cf1a-5cbd-9d74-4137587691d5).

How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 1 | by Raymond Chen.

https://devblogs.microsoft.com/oldnewthing/20250903-00/?p=111546

#cpp #winrt #async #programming #windowsdev

How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 1 - The Old New Thing

It's not representable in the Windows Runtime, but you can smuggle it.

The Old New Thing

Has someone performed any micro benchmarking of COM/WinRT against PInvoke?
I.e. I have a wrapper in WinRT, and call some Win32-function, vs calling the Win32 function directly from C#?

#DotNet #CSharp #Windows #WinRT #Cpp