static internal BclComTypes.STGMEDIUM OleSTGMEDIUM2Bcl(ref OleInterop.STGMEDIUM oleMedium) { BclComTypes.STGMEDIUM bclMedium; bclMedium.pUnkForRelease = oleMedium.pUnkForRelease; bclMedium.tymed = (BclComTypes.TYMED)oleMedium.tymed; bclMedium.unionmember = oleMedium.unionmember; return(bclMedium); }
void BclComTypes.IDataObject.GetData(ref BclComTypes.FORMATETC format, out BclComTypes.STGMEDIUM medium) { if (null != bclData) { bclData.GetData(ref format, out medium); return; } OleInterop.FORMATETC[] oleFormat = new OleInterop.FORMATETC[1]; oleFormat[0] = StructConverter.BclFormatETC2Ole(ref format); OleInterop.STGMEDIUM[] oleMedium = new OleInterop.STGMEDIUM[1]; oleData.GetData(oleFormat, oleMedium); medium = StructConverter.OleSTGMEDIUM2Bcl(ref oleMedium[0]); }
void BclComTypes.IDataObject.SetData(ref BclComTypes.FORMATETC formatIn, ref BclComTypes.STGMEDIUM medium, bool release) { if (null != bclData) { bclData.SetData(ref formatIn, ref medium, release); return; } OleInterop.FORMATETC[] oleFormat = new OleInterop.FORMATETC[1]; oleFormat[0] = StructConverter.BclFormatETC2Ole(ref formatIn); OleInterop.STGMEDIUM[] oleMedium = new OleInterop.STGMEDIUM[1]; oleMedium[0] = StructConverter.BclSTGMEDIUM2Ole(ref medium); oleData.SetData(oleFormat, oleMedium, release ? 1 : 0); }
void IBclAdviseSink.OnDataChange(ref BclComTypes.FORMATETC format, ref BclComTypes.STGMEDIUM stgmedium) { if (null != bclSink) { bclSink.OnDataChange(ref format, ref stgmedium); } else { // As in the previous case we have to copy the parameters. OleInterop.FORMATETC[] pFormatetc = new OleInterop.FORMATETC[1]; pFormatetc[0] = StructConverter.BclFormatETC2Ole(ref format); OleInterop.STGMEDIUM[] pStgmed = new OleInterop.STGMEDIUM[1]; pStgmed[0] = StructConverter.BclSTGMEDIUM2Ole(ref stgmedium); // Call the original interface. oleSink.OnDataChange(pFormatetc, pStgmed); } }
void IBclAdviseSink.OnDataChange(ref BclComTypes.FORMATETC format, ref BclComTypes.STGMEDIUM stgmedium) { if (null != bclSink) { bclSink.OnDataChange(ref format, ref stgmedium); } else { // As in the previous case we have to copy the parameters. OleInterop.FORMATETC[] pFormatetc = new OleInterop.FORMATETC[1]; pFormatetc[0] = StructConverter.BclFormatETC2Ole(ref format); OleInterop.STGMEDIUM[] pStgmed = new OleInterop.STGMEDIUM[1]; pStgmed[0] = StructConverter.BclSTGMEDIUM2Ole(ref stgmedium); // Call the original interface. oleSink.OnDataChange(pFormatetc, pStgmed); } }
void BclComTypes.IDataObject.SetData(ref BclComTypes.FORMATETC formatIn, ref BclComTypes.STGMEDIUM medium, bool release) { if (null != bclData) { bclData.SetData(ref formatIn, ref medium, release); return; } OleInterop.FORMATETC[] oleFormat = new OleInterop.FORMATETC[1]; oleFormat[0] = StructConverter.BclFormatETC2Ole(ref formatIn); OleInterop.STGMEDIUM[] oleMedium = new OleInterop.STGMEDIUM[1]; oleMedium[0] = StructConverter.BclSTGMEDIUM2Ole(ref medium); oleData.SetData(oleFormat, oleMedium, release ? 1 : 0); }
void BclComTypes.IDataObject.GetDataHere(ref BclComTypes.FORMATETC format, ref BclComTypes.STGMEDIUM medium) { if (null != bclData) { bclData.GetDataHere(ref format, ref medium); return; } OleInterop.FORMATETC[] oleFormat = new OleInterop.FORMATETC[1]; oleFormat[0] = StructConverter.BclFormatETC2Ole(ref format); OleInterop.STGMEDIUM[] oleMedium = new OleInterop.STGMEDIUM[1]; oleMedium[0] = StructConverter.BclSTGMEDIUM2Ole(ref medium); oleData.GetDataHere(oleFormat, oleMedium); medium = StructConverter.OleSTGMEDIUM2Bcl(ref oleMedium[0]); }