Dragging a PDF attachment from Gmail in Chrome onto File Explorer will produce a pdf file. While this
private void FF_Drop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)
{
var attachemnt = e.Data.GetData(DataFormats.FileDrop);
results in
Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC)) at System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& format, STGMEDIUM& medium) at System.Windows.DataObject.OleConverter.GetDataInner(FORMATETC& formatetc, STGMEDIUM& medium) at System.Windows.DataObject.OleConverter.GetDataFromOleHGLOBAL(String format, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetDataFromBoundOleDataObject(String format, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert)
File Explorer does get the file so it mush be somewhere withing the drop packet; how to get it?
User contributions licensed under CC BY-SA 3.0