Looks like a threading issue here. Can you make sure that your code of showing the Ad is wrapped in Dispatcher?
ThrowOnExternalCallFailed() on Windows 10 17763 and lower
Hong
1,216
Reputation points
An app with Target version: 18362 and Min version: 16299 works flawlessly on Windows 10 18362, 18363, but it throws exceptions by System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed on 17763 and lower:
From 17763:
Exception from OnLaunched():
The text associated with this error code could not be found.
Cannot create instance of type 'Microsoft.Advertising.WinRT.UI.AdControl' [Line: 0 Position: 0]
Stack Trace: at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Type__Impl.UnsafeType, Void*, Void*) + 0xd5
at Windows.UI.Xaml.Controls.IFrame__Impl.Stubs.Navigate(__ComObject, Type, Object) + 0x8e
From 16299:
Exception: The text associated with this error code could not be found.
Cannot find a Resource with the Name/Key UseSystemFocusVisuals [Line: 0 Position: 0]
Type: Windows.UI.Xaml.Markup.XamlParseException
Stack trace: at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Type__Impl.UnsafeType, Void*, Void*) + 0xd5
at Windows.UI.Xaml.Controls.IFrame__Impl.Stubs.Navigate(__ComObject, Type, Object) + 0x8e
Could anyone shed some light on this?
2 answers
Sort by: Most helpful
-
-
Roy Li - MSFT 33,506 Reputation points Microsoft Vendor
2019-12-25T08:13:43.837+00:00 Hello,
Welcome to Microsoft Q&A!
Thank you for using MicrosoftQ&A! Microsoft Q&A is now in a public review version. Questions about AdSDK is not fully supported here. If you have questions about AdSDK, please move to the AdSDK Integration & Ad Mediation forum.