BExplorer.Shell.DataObject.CopyMedium C# (CSharp) Method

CopyMedium() private method

Creates a copy of the STGMEDIUM structure.
private CopyMedium ( System.Runtime.InteropServices.ComTypes.STGMEDIUM &medium ) : System.Runtime.InteropServices.ComTypes.STGMEDIUM
medium System.Runtime.InteropServices.ComTypes.STGMEDIUM The data to copy.
return System.Runtime.InteropServices.ComTypes.STGMEDIUM
        private STGMEDIUM CopyMedium(ref STGMEDIUM medium)
        {
            STGMEDIUM sm = new STGMEDIUM();
            int hr = CopyStgMedium(ref medium, ref sm);
            if (hr != 0)
                throw Marshal.GetExceptionForHR(hr);

            return sm;

        }