in WindowsStoreDLL/WindowsStoreImpl.cpp [119:142]
IAsyncAction WindowsStoreImpl::GetLicenseState(WindowsStoreCallback callback, void* userData)
{
// return control to caller
co_await winrt::resume_background();
// now execute the async code
StoreAppLicense license = co_await m_storeContext.GetAppLicenseAsync();
if (license.IsActive())
{
if (license.IsTrial())
{
callback(S_OK, L"IsTrial", userData);
}
else
{
callback(S_OK, L"Full", userData);
}
}
else
{
callback(S_OK, L"inactive", userData);
}
co_return;
}