Reference:
//Backup Clipboard to object
System.Windows.Forms.DataObject oldData =
(DataObject)System.Windows.Forms.Clipboard.GetDataObject();
//Clear Clipboard
System.Windows.Forms.Clipboard.Clear();
//Do other things...
//Restore from backup object
Clipboard.SetDataObject(oldData, true);//Exception
Question ( 1 or 2 ):
1、Exception :System.Runtime.InteropServices.ExternalException
ErrorCode: -2147221040
2、Data Error ( Sometimes result is true, but sometimes it is false ),
Example:
Clipboard: ABC---->Backup
//Operation ( more than once ) : use Ctrl+C and Ctrl+C in other application
//Ctrl + C: 123,Ctrl + V:123
Clipboard: 123<----Restore
Please help me, than you.