The SAL for XTaskQueueSetCurrentProcessTaskQueue is incorrect; it should be allowing a null parameter.
/// <summary>
/// Sets the given task queue as the process wide task queue. The
/// queue can be set to nullptr, in which case XTaskQueueGetCurrentProcessTaskQueue will
/// also return nullptr. The provided queue will have its handle duplicated
/// and any existing process task queue will have its handle closed.
/// </summary>
/// <param name='queue'>The queue to set up as the default task queue for the procces.</param>
STDAPI_(void) XTaskQueueSetCurrentProcessTaskQueue(
_In_ XTaskQueueHandle queue
) noexcept;
That should use _In_opt_.
The SAL for
XTaskQueueSetCurrentProcessTaskQueueis incorrect; it should be allowing a null parameter.That should use
_In_opt_.