Skip to content

COMException error when dragging over Skype #139

@Antonyo

Description

@Antonyo

Hello, we're developing an application using your component and when a listbox item is dragged onto an Skype conversation a COMException is thrown with the following message: "Error HRESULT E_FAIL has been returned from a call to a COM component." and the application closes. In our case the listbox contains references to file so the data format is FileDrop and the data is the list of selected files referenced in the listbox items.

This is not an issue with your component, it also happen implementing our own drag handler using the System.Windows.DragDrop class so it should be a problem with wpf, what I need is some way to intercept the exception because right now the exception occurs outside the draghandler, I provide below some information about where exactly happen.

I have a commit in my own fork that I can create a pull request out of it: https://github.com/Antonyo/gong-wpf-dragdrop/commit/fba7375e31fa6161aaff1f6e06a96d5160f57231

What steps will reproduce the problem?

  1. Create a listbox with items referencing file path.
  2. Attach a Draghandler to the listbox and set is as DragSource.
  3. On StartDrag create a DataObject with FileDrop as data format and an string[] containing the paths of the selected files as data.
  4. Drag a listbox item onto an skype conversation.

What is the expected output? What do you see instead?

A COMException is thrown with the following message: "Error HRESULT E_FAIL has been returned from a call to a COM component." and the application closes. The skype window correctly attaches the file but the exception shouldn't be thrown.

What version of the product are you using? On what operating system?

I'm using the 0.1.4.3 version and Skype 7.7.64.103 over Windows 8.1.

Please provide any additional information below.

The exception occurs here: https://github.com/punker76/gong-wpf-dragdrop/blob/master/GongSolutions.Wpf.DragDrop/DragDrop.cs#L796

I found an article with a similar scenario but in our case we're actually using the correct FileDrop format:
http://stackoverflow.com/questions/19775784/error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component-when-try

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions