I am using the following interface in my code:
// Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{372E1D3B-38D3-42E4-A15B-8AB2B178F513}
DECLARE_INTERFACE_IID_(IApplicationView, IInspectable, "372E1D3B-38D3-42E4-A15B-8AB2B178F513")
...
then querying this interface:
CComPtr<IServiceProvider> m_pServiceProvider;
CComPtr<IApplicationViewCollection> appCollection = NULL;
m_pServiceProvider.CoCreateInstance(__uuidof(IServiceProvider), NULL, CLSCTX_LOCAL_SERVER));
m_pServiceProvider->QueryService(__uuidof(IApplicationViewCollection), &appCollection));
....
I am also using a few other internal (non documented) interfaces, which I found on github. As I understood from github, the IID of those interfaces might change depending on windows build, because I have found different IIDs for the same interface. I wonder how can we get IID on runtime (maybe from registry?), so the code is portable and works on all windows builds. Please correct me if I am wrong or miss something, I don't know much about COM.