locked
Share Target app gets InvalidComObjectException RRS feed

  • Question

  •  Windows.ApplicationModel.DataTransfer.ShareTarget.ShareOperation shareOperation= shareTargetArgs.ShareOperation;
    
    foreach (var asd in shareOperation.Data.AvailableFormats){
                        Debug.WriteLine("available format: " + asd);
    }
    
    if (shareOperation.Data.Contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.Html)){}

    I select the contents of a web page (any page gives the same result) in internet explorer and hit share to share the content with my application. It Works once or barely twice, then it throws a fatal exception (on line -> Data.Contains )

    A first chance exception of type 'System.Runtime.InteropServices.InvalidComObjectException' occurred in RADIO.exe
    
    Additional information: COM object that has been separated from its underlying RCW cannot be used.

    I don't understand what i'm doing wrong here. Would you please share your opinion; what can the problem be?

    • Edited by ELRaymod Wednesday, May 2, 2012 7:40 AM typo
    Wednesday, May 2, 2012 7:37 AM

All replies