As far as I know there is no officially documented way of getting the Focus assist status.
It still can be accessed by querying the WNF State of the feature, although this is completely undocumented and not officially supported.
The various states for WNF Data have been reverse engineered, so the one for Focus Assist is WNF_SHEL_QUIETHOURS_ACTIVE_PROFILE_CHANGED
.
The C++ sample below shows how to get the state of Focus Assist feature (mostly off
, priority_only
and alarm_only
).
Once again, be wary that this is not officially supported by Microsoft:
#include
#include
#include
#include