BExplorer.Shell.DropExtensions.GetDropDescription C# (CSharp) Method

GetDropDescription() private method

private GetDropDescription ( this dataObject ) : object
dataObject this
return object
        public static object GetDropDescription(this System.Runtime.InteropServices.ComTypes.IDataObject dataObject)
        {
			FORMATETC formatETC;
            FillFormatETC(DropDescriptionFormat, TYMED.TYMED_HGLOBAL, out formatETC);

            if (0 == dataObject.QueryGetData(ref formatETC))
            {
				STGMEDIUM medium;
                dataObject.GetData(ref formatETC, out medium);
                try
                {
                    return (DataObject.DropDescription)Marshal.PtrToStructure(medium.unionmember, typeof(BExplorer.Shell.DataObject.DropDescription));
                }
                catch (AccessViolationException)
                {
                }
                finally
                {
                    ReleaseStgMedium(ref medium);
                }
            }

            return null;
        }