Developer technologies | Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows devices.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
protected override async void OnLaunched(LaunchActivatedEventArgs e)
{
try
{
if (AppInstance.GetInstances().Count == 0)
{
PCLUtility.AddLog("First Instance");
}
else
{
}
}
catch (Exception ex)
{
}
}
GetInstances() occasionally throws the following:
Stack Trace:
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe
at __Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37
at Windows.ApplicationModel.AppInstance.GetInstances() + 0x2c
at MyApp.App.<OnLaunched>d__33.MoveNext() + 0x926
It is not a big deal because it is rare. I am curious about the possible causes.
A Microsoft platform for building and publishing apps for Windows devices.