void WindowsStoreImpl::GetLicenseState()

in WindowsStore/WindowsStoreImpl.cpp [121:142]


void WindowsStoreImpl::GetLicenseState(WindowsStoreCallback callback, void* userData)
{
    create_task(m_storeContext->GetAppLicenseAsync()).then([this, callback, userData](StoreAppLicense^ license)
    {
        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);
        }
    }, task_continuation_context::get_current_winrt_context());
}