131 references to TYMED
netstandard (1)
netstandard.cs (1)
1671[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.TYMED))]
PresentationCore (36)
System\Windows\dataobject.cs (36)
643if ((formatetc.tymed & TYMED.TYMED_HGLOBAL) != 0) 645medium.tymed = TYMED.TYMED_HGLOBAL; 659else if ( ( formatetc.tymed & TYMED.TYMED_ISTREAM ) != 0 ) 661medium.tymed = TYMED.TYMED_ISTREAM; 701if (medium.tymed != TYMED.TYMED_ISTORAGE && 702medium.tymed != TYMED.TYMED_ISTREAM && 703medium.tymed != TYMED.TYMED_HGLOBAL && 704medium.tymed != TYMED.TYMED_FILE) 1276private bool GetTymedUseable(TYMED tymed) 1428if ((formatetc.tymed & TYMED.TYMED_HGLOBAL) != 0) 1432else if ( ( formatetc.tymed & TYMED.TYMED_GDI ) != 0 ) 1436else if ( ( formatetc.tymed & TYMED.TYMED_ENHMF ) != 0 ) 1440else if ( ( formatetc.tymed & TYMED.TYMED_ISTREAM ) != 0 ) 1541medium.tymed = TYMED.TYMED_HGLOBAL; 1587medium.tymed = TYMED.TYMED_ISTREAM; 1612medium.tymed = TYMED.TYMED_GDI; 1645medium.tymed = TYMED.TYMED_ENHMF; 2219private static readonly TYMED[] ALLOWED_TYMEDS = new TYMED[] 2221TYMED.TYMED_HGLOBAL, 2222TYMED.TYMED_ISTREAM, 2223TYMED.TYMED_ENHMF, 2224TYMED.TYMED_MFPICT, 2225TYMED.TYMED_GDI 2283temp.tymed = TYMED.TYMED_GDI; 2287temp.tymed = TYMED.TYMED_ENHMF; 2291temp.tymed = TYMED.TYMED_HGLOBAL; 2673formatetc.tymed = TYMED.TYMED_ISTREAM; 2683if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_ISTREAM) 2845formatetc.tymed = TYMED.TYMED_HGLOBAL; 2855if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_HGLOBAL) 2878TYMED tymed; 2883tymed = (TYMED)0; 2887tymed = TYMED.TYMED_GDI; 2891tymed = TYMED.TYMED_ENHMF; 2894if (tymed == (TYMED)0)
System (1)
src\libraries\shims\System\ref\System.cs (1)
828[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ComTypes.TYMED))]
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\ComTypes\FORMATETC.cs (1)
18public TYMED tymed;
System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs (1)
11public TYMED tymed;
System.Windows.Forms (8)
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (1)
444if ((uint)medium.tymed == (uint)TYMED.TYMED_GDI
System\Windows\Forms\OLE\DataObject.FormatEnumerator.cs (2)
50tymed = format.Equals(DataFormats.Bitmap) ? ComTypes.TYMED.TYMED_GDI : ComTypes.TYMED.TYMED_HGLOBAL
System\Windows\Forms\OLE\DragDropHelper.cs (5)
167tymed = ComTypes.TYMED.TYMED_HGLOBAL 272tymed = ComTypes.TYMED.TYMED_HGLOBAL 278tymed = ComTypes.TYMED.TYMED_HGLOBAL, 428tymed = ComTypes.TYMED.TYMED_HGLOBAL 434tymed = ComTypes.TYMED.TYMED_HGLOBAL,
System.Windows.Forms.Primitives (1)
Windows\Win32\System\Com\STGMEDIUM.cs (1)
33tymed = (ComType.TYMED)stg.tymed,
System.Windows.Forms.Tests (82)
System\Windows\Forms\ClipboardTests.cs (1)
1024tymed = ComTypes.TYMED.TYMED_HGLOBAL
System\Windows\Forms\DataObjectTests.cs (75)
1853medium.tymed = TYMED.TYMED_ENHMF; 2022public static TheoryData<string, TYMED> EnumFormatEtc_TheoryData() => new() 2024{ DataFormats.Bitmap, TYMED.TYMED_GDI }, 2025{ DataFormats.CommaSeparatedValue, TYMED.TYMED_HGLOBAL }, 2026{ DataFormats.Dib, TYMED.TYMED_HGLOBAL }, 2027{ DataFormats.Dif, TYMED.TYMED_HGLOBAL }, 2028{ DataFormats.EnhancedMetafile, TYMED.TYMED_HGLOBAL }, 2029{ DataFormats.FileDrop, TYMED.TYMED_HGLOBAL }, 2030{ "FileName", TYMED.TYMED_HGLOBAL }, 2031{ "FileNameW", TYMED.TYMED_HGLOBAL }, 2032{ DataFormats.Html, TYMED.TYMED_HGLOBAL }, 2033{ DataFormats.Locale, TYMED.TYMED_HGLOBAL }, 2034{ DataFormats.MetafilePict, TYMED.TYMED_HGLOBAL }, 2035{ DataFormats.OemText, TYMED.TYMED_HGLOBAL }, 2036{ DataFormats.Palette, TYMED.TYMED_HGLOBAL }, 2037{ DataFormats.PenData, TYMED.TYMED_HGLOBAL }, 2038{ DataFormats.Riff, TYMED.TYMED_HGLOBAL }, 2039{ DataFormats.Rtf, TYMED.TYMED_HGLOBAL }, 2040{ DataFormats.Serializable, TYMED.TYMED_HGLOBAL }, 2041{ DataFormats.StringFormat, TYMED.TYMED_HGLOBAL }, 2042{ DataFormats.SymbolicLink, TYMED.TYMED_HGLOBAL }, 2043{ DataFormats.Text, TYMED.TYMED_HGLOBAL }, 2044{ DataFormats.Tiff, TYMED.TYMED_HGLOBAL }, 2045{ DataFormats.UnicodeText, TYMED.TYMED_HGLOBAL }, 2046{ DataFormats.WaveAudio, TYMED.TYMED_HGLOBAL } 2051public void DataObject_EnumFormatEtc_InvokeWithValues_Success(string format1, TYMED expectedTymed) 2098result[0].tymed.Should().Be(TYMED.TYMED_HGLOBAL); 2181result[0].tymed.Should().Be(TYMED.TYMED_GDI); 2191result[0].tymed.Should().Be(TYMED.TYMED_HGLOBAL); 2201result[0].tymed.Should().Be(TYMED.TYMED_HGLOBAL); 2240public void DataObject_EnumFormatEtc_CloneWithValues_Success(string format1, TYMED expectedTymed) 2288result[0].tymed.Should().Be(TYMED.TYMED_HGLOBAL); 2385tymed = TYMED.TYMED_HGLOBAL, 2391tymed = TYMED.TYMED_HGLOBAL 2428tymed = TYMED.TYMED_HGLOBAL, 2434tymed = TYMED.TYMED_HGLOBAL 2465tymed = TYMED.TYMED_HGLOBAL, 2471tymed = TYMED.TYMED_HGLOBAL 2487tymed = TYMED.TYMED_HGLOBAL, 2493tymed = TYMED.TYMED_HGLOBAL 2508tymed = TYMED.TYMED_HGLOBAL, 2514tymed = TYMED.TYMED_HGLOBAL 2549tymed = TYMED.TYMED_HGLOBAL, 2555tymed = TYMED.TYMED_HGLOBAL 2588tymed = TYMED.TYMED_HGLOBAL, 2593tymed = TYMED.TYMED_HGLOBAL 2607tymed = TYMED.TYMED_HGLOBAL, 2612tymed = TYMED.TYMED_HGLOBAL 2618[InlineData(TYMED.TYMED_FILE, TYMED.TYMED_FILE)] 2619[InlineData(TYMED.TYMED_ISTORAGE, TYMED.TYMED_ISTORAGE)] 2620[InlineData(TYMED.TYMED_MFPICT, TYMED.TYMED_MFPICT)] 2621[InlineData(TYMED.TYMED_ENHMF, TYMED.TYMED_ENHMF)] 2622[InlineData(TYMED.TYMED_NULL, TYMED.TYMED_NULL)] 2623public void IComDataObjectGetDataHere_InvalidTymed_ThrowsCOMException(TYMED formatetcTymed, TYMED stgMediumTymed) 2642[InlineData(TYMED.TYMED_HGLOBAL, TYMED.TYMED_HGLOBAL, (short)CLIPBOARD_FORMAT.CF_UNICODETEXT)] 2643[InlineData(TYMED.TYMED_HGLOBAL, TYMED.TYMED_HGLOBAL, (short)CLIPBOARD_FORMAT.CF_HDROP)] 2644[InlineData(TYMED.TYMED_ISTREAM, TYMED.TYMED_ISTREAM, (short)CLIPBOARD_FORMAT.CF_UNICODETEXT)] 2645[InlineData(TYMED.TYMED_ISTREAM, TYMED.TYMED_ISTREAM, (short)CLIPBOARD_FORMAT.CF_HDROP)] 2646[InlineData(TYMED.TYMED_GDI, TYMED.TYMED_GDI, (short)CLIPBOARD_FORMAT.CF_UNICODETEXT)] 2647[InlineData(TYMED.TYMED_GDI, TYMED.TYMED_GDI, (short)CLIPBOARD_FORMAT.CF_HDROP)] 2648public void IComDataObjectGetDataHere_NoDataPresentNoData_ThrowsCOMException(TYMED formatetcTymed, TYMED stgMediumTymed, short cfFormat) 2828tymed = (uint)TYMED.TYMED_HGLOBAL,
System\Windows\Forms\DragDropFormatTests.cs (5)
13using TYMED = System.Runtime.InteropServices.ComTypes.TYMED; 31tymed = TYMED.TYMED_HGLOBAL 37tymed = TYMED.TYMED_HGLOBAL, 54tymed = TYMED.TYMED_ISTREAM 60tymed = TYMED.TYMED_ISTREAM,
System\Windows\Forms\DragDropHelperTests.cs (1)
98tymed = TYMED.TYMED_HGLOBAL