Add custom objects to DataPackage for drag-drop across App instances in UWP

0

I am working on a tabbed editor which supports drag-dropping tabs across App instances. I want to add my sample tab object to DataPackage when drag event start and access the tab object in drop event. The problem is when I type-cast the tab object to my tab interface it gives the following error:

Unable to cast COM object of type 'System.__ComObject' to interface type 'ITabInterface'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{GUID}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Is there any way I can solve this??

Update:

Link to a sample in which casting fails: https://drive.google.com/file/d/1SVWYFZ_bxHEt9BSKAMf7NjFcJukwL4Yn/view?usp=sharing

c#
uwp
drag-and-drop
windows-10-universal
windows-10-desktop
asked on Stack Overflow Jul 5, 2020 by SoumyaMahunt • edited Jul 8, 2020 by SoumyaMahunt

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0