Occasional "System.Exception: OpenClipboard Failed (Exception from HRESULT: 0x800401D0)"
Hong
1,211
Reputation points
An app occasionally throws the following exception:
System.Exception: OpenClipboard Failed (Exception from HRESULT: 0x800401D0)
Stack Trace:
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe
at __Interop.ForwardComStubs.Stub_9[TThis, TArg0](__ComObject, TArg0, Int32) + 0x5a
at ClassLibraryUno.Utility.<>c__DisplayClass119_0.<CopyToClipboard>b__0() + 0x34
at Windows.Foundation.DeferralCompletedHandler.Invoke() + 0x25
at Camera_Alternative!<BaseAddress>+0x28dfd9c
DataPackage dp = new DataPackage();
dp.SetText(sText);
await dispatcher.RunAsync(
CoreDispatcherPriority.Normal,
() =>
{
Clipboard.SetContent(dp);
});
Could anyone offer a tip on the possible cause?
Sign in to answer