void CustomFontManager::ValidateUri(WinString const& uriString) { if (uriString == WinString()) return; ComPtr<IUriRuntimeClass> uri; ThrowIfFailed(m_uriFactory->CreateWithRelativeUri(WinString(L"ms-appx://"), uriString, &uri)); WinString schemeName; ThrowIfFailed(uri->get_SchemeName(schemeName.GetAddressOf())); if (!schemeName.Equals(HStringReference(L"ms-appx").Get()) && !schemeName.Equals(HStringReference(L"ms-appdata").Get())) { ThrowHR(E_INVALIDARG, Strings::InvalidFontFamilyUriScheme); } }
static bool IsSame(HSTRING* outputValue, WinString const& value) { return value.Equals(*outputValue); }