private FORMATETC ConvertToFormatEtc(string aFormatName) { FORMATETC result = default(FORMATETC); result.cfFormat = ClipboardFormats.GetFormat(aFormatName); result.dwAspect = DVASPECT.DVASPECT_CONTENT; result.ptd = IntPtr.Zero; result.lindex = -1; result.tymed = TYMED.TYMED_HGLOBAL; return(result); }
unsafe FORMATETC Win32Com.IDataObject.GetCanonicalFormatEtc(FORMATETC *formatIn) { if (_wrapped is Win32Com.IDataObject ole) { return(ole.GetCanonicalFormatEtc(formatIn)); } var formatOut = new FORMATETC(); formatOut.ptd = IntPtr.Zero; throw new COMException(nameof(UnmanagedMethods.HRESULT.E_NOTIMPL), unchecked ((int)UnmanagedMethods.HRESULT.E_NOTIMPL)); }