507 references to VarEnum
Microsoft.CodeAnalysis (1)
DiaSymReader\Writer\ISymUnmanagedWriter.cs (1)
151
_type = (short)
VarEnum
.VT_DATE;
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\HACK_VariantStructure.cs (1)
36
if (_type == (short)
VarEnum
.VT_BOOL && _booleanValue == 4)
Microsoft.VisualStudio.LanguageServices.Implementation (4)
CodeModel\FileCodeModel_CodeGen.cs (2)
701
if (CodeModelInterop.CanChangedVariantType(@base,
VarEnum
.VT_UNKNOWN) &&
737
if (CodeModelInterop.CanChangedVariantType(@base,
VarEnum
.VT_UNKNOWN) &&
CodeModel\Interop\CodeModelInterop.cs (2)
18
VarEnum
vt);
20
public static bool CanChangedVariantType(object source,
VarEnum
variantType)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
736
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.
VarEnum
))]
netstandard (1)
netstandard.cs (1)
1744
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.
VarEnum
))]
PresentationCore (237)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (104)
45
VarEnum
interopTypeInfo;
50
interopTypeInfo =
VarEnum
.VT_I4;
54
interopTypeInfo =
VarEnum
.VT_I4;
65
interopTypeInfo = (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI1);
75
internal static void EncodeAttribute(Guid guid, object value,
VarEnum
type, Stream stream)
93
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I1)://8208
99
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI1)://8209
105
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I2)://8194
112
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI2)://8210
119
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I4)://8195
126
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI4)://8211
133
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I8)://8212
140
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI8)://8213
147
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R4 )://8196
154
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R8)://8197
161
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DATE)://8199
168
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_BOOL )://8203
188
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DECIMAL)://8206
195
case (
VarEnum
.VT_I1)://16
201
case (
VarEnum
.VT_UI1)://17
207
case (
VarEnum
.VT_I2)://2
213
case (
VarEnum
.VT_UI2)://18
219
case (
VarEnum
.VT_I4)://3
225
case (
VarEnum
.VT_UI4)://19
231
case (
VarEnum
.VT_I8)://20
237
case (
VarEnum
.VT_UI8)://21
243
case (
VarEnum
.VT_R4 )://4
249
case (
VarEnum
.VT_R8)://5
255
case (
VarEnum
.VT_DATE)://7
261
case (
VarEnum
.VT_BOOL )://11
278
case (
VarEnum
.VT_DECIMAL)://14
284
case (
VarEnum
.VT_BSTR)://8
505
VarEnum
type;
521
internal static object DecodeAttribute(Guid guid, Stream memStream, out
VarEnum
type)
537
type = (
VarEnum
)br.ReadUInt16();
542
type = (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI1);
546
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I1):
548
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI1):
563
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I2):
571
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI2):
579
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I4):
587
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI4):
595
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I8):
603
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI8):
611
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R4):
619
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R8):
627
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DATE):
637
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_BOOL):
645
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DECIMAL):
653
case (
VarEnum
.VT_I1):
655
case (
VarEnum
.VT_UI1):
657
case (
VarEnum
.VT_I2):
659
case (
VarEnum
.VT_UI2):
661
case (
VarEnum
.VT_I4):
663
case (
VarEnum
.VT_UI4):
665
case (
VarEnum
.VT_I8):
667
case (
VarEnum
.VT_UI8):
669
case (
VarEnum
.VT_R4):
671
case (
VarEnum
.VT_R8):
673
case (
VarEnum
.VT_DATE):
675
case (
VarEnum
.VT_BOOL):
677
case (
VarEnum
.VT_DECIMAL):
679
case (
VarEnum
.VT_BSTR):
895
VarEnum
varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
899
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I1)://8208
900
case (
VarEnum
.VT_I1)://16
901
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DATE)://8199
902
case (
VarEnum
.VT_DATE)://7
916
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I1)://8208
921
case (
VarEnum
.VT_I1)://16
926
case (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DATE)://8199
933
case (
VarEnum
.VT_DATE)://7
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (1)
611
System.Runtime.InteropServices.
VarEnum
type = SerializationHelper.ConvertToVarEnum(PersistenceTypes.StylusTip, true);
MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (42)
208
public static
VarEnum
ConvertToVarEnum(Type type, bool throwOnError)
212
return
VarEnum
.VT_I1;
216
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I1);
220
return
VarEnum
.VT_UI1;
224
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI1);
228
return
VarEnum
.VT_I2;
232
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I2);
236
return
VarEnum
.VT_UI2;
240
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI2);
244
return
VarEnum
.VT_I4;
248
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I4);
252
return
VarEnum
.VT_UI4;
256
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI4);
260
return
VarEnum
.VT_I8;
264
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_I8);
268
return
VarEnum
.VT_UI8;
272
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_UI8);
276
return
VarEnum
.VT_R4;
280
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R4);
284
return
VarEnum
.VT_R8;
288
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_R8);
292
return
VarEnum
.VT_DATE;
296
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DATE);
300
return
VarEnum
.VT_BOOL;
304
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_BOOL);
308
return
VarEnum
.VT_BSTR;
312
return
VarEnum
.VT_DECIMAL;
316
return (
VarEnum
.VT_ARRAY |
VarEnum
.VT_DECIMAL);
326
return
VarEnum
.VT_UNKNOWN;
System\Windows\Media\Imaging\BitmapMetadata.cs (1)
1324
varType = (ushort)
VarEnum
.VT_FILETIME
System\Windows\Media\Imaging\PropVariant.cs (89)
117
internal void InitVector(Array array, Type type,
VarEnum
varEnum)
119
Init(array, type, varEnum |
VarEnum
.VT_VECTOR);
122
internal void Init(Array array, Type type,
VarEnum
vt)
162
varType = (ushort) (fAscii ?
VarEnum
.VT_LPSTR :
VarEnum
.VT_LPWSTR);
163
varType |= (ushort)
VarEnum
.VT_VECTOR;
223
varType = (ushort)
VarEnum
.VT_EMPTY;
231
InitVector(value as Array, typeof(sbyte),
VarEnum
.VT_I1);
235
InitVector(value as Array, typeof(byte),
VarEnum
.VT_UI1);
239
varType = (ushort)
VarEnum
.VT_LPSTR;
257
InitVector(value as Array, typeof(short),
VarEnum
.VT_I2);
261
InitVector(value as Array, typeof(ushort),
VarEnum
.VT_UI2);
265
InitVector(value as Array, typeof(int),
VarEnum
.VT_I4);
269
InitVector(value as Array, typeof(uint),
VarEnum
.VT_UI4);
273
InitVector(value as Array, typeof(Int64),
VarEnum
.VT_I8);
277
InitVector(value as Array, typeof(UInt64),
VarEnum
.VT_UI8);
281
InitVector(value as Array, typeof(float),
VarEnum
.VT_R4);
285
InitVector(value as Array, typeof(double),
VarEnum
.VT_R8);
289
InitVector(value as Array, typeof(Guid),
VarEnum
.VT_CLSID);
305
InitVector(array, typeof(short),
VarEnum
.VT_BOOL);
318
varType = (ushort)
VarEnum
.VT_LPWSTR;
323
varType = (ushort)
VarEnum
.VT_I1;
328
varType = (ushort)
VarEnum
.VT_UI1;
333
varType = (ushort)
VarEnum
.VT_FILETIME;
338
varType = (ushort)
VarEnum
.VT_LPSTR;
343
varType = (ushort)
VarEnum
.VT_I2;
348
varType = (ushort)
VarEnum
.VT_UI2;
353
varType = (ushort)
VarEnum
.VT_I4;
358
varType = (ushort)
VarEnum
.VT_UI4;
363
varType = (ushort)
VarEnum
.VT_I8;
368
varType = (ushort)
VarEnum
.VT_UI8;
373
varType = (ushort)
VarEnum
.VT_R4;
378
varType = (ushort)
VarEnum
.VT_R8;
384
varType = (ushort)
VarEnum
.VT_CLSID;
390
varType = (ushort)
VarEnum
.VT_BOOL;
395
Init((value as BitmapMetadataBlob).InternalGetBlobValue(), typeof(byte),
VarEnum
.VT_BLOB);
415
varType = (ushort)
VarEnum
.VT_UNKNOWN;
427
VarEnum
vt = (
VarEnum
) varType;
429
if ((vt &
VarEnum
.VT_VECTOR) != 0 || vt ==
VarEnum
.VT_BLOB)
433
vt &= ~
VarEnum
.VT_VECTOR;
435
if (vt ==
VarEnum
.VT_UNKNOWN)
450
else if (vt ==
VarEnum
.VT_LPWSTR || vt ==
VarEnum
.VT_LPSTR)
468
else if (vt ==
VarEnum
.VT_LPWSTR ||
469
vt ==
VarEnum
.VT_LPSTR ||
470
vt ==
VarEnum
.VT_CLSID)
474
else if (vt ==
VarEnum
.VT_UNKNOWN)
480
vt =
VarEnum
.VT_EMPTY;
485
VarEnum
vt = (
VarEnum
) varType;
487
if ((vt &
VarEnum
.VT_VECTOR) != 0)
489
switch (vt & (~
VarEnum
.VT_VECTOR))
491
case
VarEnum
.VT_EMPTY:
494
case
VarEnum
.VT_I1:
502
case
VarEnum
.VT_UI1:
509
case
VarEnum
.VT_I2:
516
case
VarEnum
.VT_UI2:
524
case
VarEnum
.VT_I4:
531
case
VarEnum
.VT_UI4:
539
case
VarEnum
.VT_I8:
546
case
VarEnum
.VT_UI8:
554
case
VarEnum
.VT_R4:
561
case
VarEnum
.VT_R8:
568
case
VarEnum
.VT_BOOL:
576
case
VarEnum
.VT_CLSID:
588
case
VarEnum
.VT_LPSTR:
605
case
VarEnum
.VT_LPWSTR:
622
case
VarEnum
.VT_UNKNOWN:
631
case
VarEnum
.VT_EMPTY:
634
case
VarEnum
.VT_I1:
637
case
VarEnum
.VT_UI1:
640
case
VarEnum
.VT_I2:
643
case
VarEnum
.VT_UI2:
646
case
VarEnum
.VT_I4:
649
case
VarEnum
.VT_UI4:
652
case
VarEnum
.VT_I8:
655
case
VarEnum
.VT_UI8:
658
case
VarEnum
.VT_R4:
661
case
VarEnum
.VT_R8:
664
case
VarEnum
.VT_FILETIME:
667
case
VarEnum
.VT_BOOL:
670
case
VarEnum
.VT_CLSID:
675
case
VarEnum
.VT_LPSTR:
678
case
VarEnum
.VT_LPWSTR:
681
case
VarEnum
.VT_BLOB:
688
case
VarEnum
.VT_UNKNOWN:
748
return (varType == (ushort)
VarEnum
.VT_UNKNOWN);
System.Private.CoreLib (134)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MarshalAsAttribute.cs (1)
21
public
VarEnum
SafeArraySubType;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (114)
16
private const
VarEnum
VT_VERSIONED_STREAM = (
VarEnum
)73;
148
if (VarType ==
VarEnum
.VT_BSTR)
152
else if (VarType.HasFlag(
VarEnum
.VT_ARRAY))
156
else if (VarType ==
VarEnum
.VT_UNKNOWN || VarType ==
VarEnum
.VT_DISPATCH)
163
else if (VarType ==
VarEnum
.VT_RECORD)
175
else if (VarType ==
VarEnum
.VT_LPSTR || VarType ==
VarEnum
.VT_LPWSTR || VarType ==
VarEnum
.VT_CLSID)
179
else if (VarType ==
VarEnum
.VT_BLOB || VarType ==
VarEnum
.VT_BLOB_OBJECT)
183
else if (VarType ==
VarEnum
.VT_STREAM || VarType ==
VarEnum
.VT_STREAMED_OBJECT || VarType ==
VarEnum
.VT_STORAGE || VarType ==
VarEnum
.VT_STORED_OBJECT)
199
else if (VarType ==
VarEnum
.VT_CF)
208
else if (VarType.HasFlag(
VarEnum
.VT_VECTOR))
210
switch (VarType & ~
VarEnum
.VT_VECTOR)
212
case
VarEnum
.VT_BSTR:
218
case
VarEnum
.VT_LPSTR:
219
case
VarEnum
.VT_LPWSTR:
225
case
VarEnum
.VT_CF:
231
case
VarEnum
.VT_VARIANT:
255
/// <exception cref="ArgumentException">When <typeparamref name="T"/> does not directly correspond to a <see cref="
VarEnum
"/> variant type.</exception>
267
variant.VarType =
VarEnum
.VT_I2;
272
variant.VarType =
VarEnum
.VT_I4;
277
variant.VarType =
VarEnum
.VT_R4;
282
variant.VarType =
VarEnum
.VT_R8;
287
variant.VarType =
VarEnum
.VT_CY;
292
variant.VarType =
VarEnum
.VT_DATE;
297
variant.VarType =
VarEnum
.VT_BSTR;
307
variant.VarType =
VarEnum
.VT_BSTR;
312
variant.VarType =
VarEnum
.VT_ERROR;
318
variant.VarType =
VarEnum
.VT_BOOL;
326
variant.VarType =
VarEnum
.VT_DECIMAL;
330
variant.VarType =
VarEnum
.VT_I1;
335
variant.VarType =
VarEnum
.VT_UI1;
340
variant.VarType =
VarEnum
.VT_UI2;
345
variant.VarType =
VarEnum
.VT_UI4;
350
variant.VarType =
VarEnum
.VT_I8;
355
variant.VarType =
VarEnum
.VT_UI8;
379
/// <exception cref="ArgumentException">When the provided <paramref name="vt"/> corresponds to a variant type that is not supported in VARIANTs or is <see cref="
VarEnum
.VT_DECIMAL"/></exception>
380
/// <exception cref="PlatformNotSupportedException">When the provided <paramref name="vt"/> specifies the <see cref="
VarEnum
.VT_ARRAY"/> flag for SAFEARRAYs.</exception>
381
public static unsafe ComVariant CreateRaw<T>(
VarEnum
vt, T rawValue)
385
if (vt ==
VarEnum
.VT_DECIMAL)
389
if (vt ==
VarEnum
.VT_VARIANT)
393
if (vt.HasFlag(
VarEnum
.VT_ARRAY) && !OperatingSystem.IsWindows())
402
(
VarEnum
.VT_I1 or
VarEnum
.VT_UI1, 1) => rawValue,
403
(
VarEnum
.VT_I2 or
VarEnum
.VT_UI2 or
VarEnum
.VT_BOOL, 2) => rawValue,
404
(
VarEnum
.VT_ERROR or
VarEnum
.VT_HRESULT or
VarEnum
.VT_I4 or
VarEnum
.VT_UI4 or
VarEnum
.VT_R4 or
VarEnum
.VT_INT or
VarEnum
.VT_UINT, 4) => rawValue,
405
(
VarEnum
.VT_I8 or
VarEnum
.VT_UI8 or
VarEnum
.VT_R8 or
VarEnum
.VT_DATE, 8) => rawValue,
406
(
VarEnum
.VT_UNKNOWN or
VarEnum
.VT_DISPATCH or
VarEnum
.VT_LPSTR or
VarEnum
.VT_BSTR or
VarEnum
.VT_LPWSTR or
VarEnum
.VT_SAFEARRAY
407
or
VarEnum
.VT_CLSID or
VarEnum
.VT_STREAM or
VarEnum
.VT_STREAMED_OBJECT or
VarEnum
.VT_STORAGE or
VarEnum
.VT_STORED_OBJECT or
VarEnum
.VT_CF or VT_VERSIONED_STREAM, _) when sizeof(T) == nint.Size => rawValue,
408
(
VarEnum
.VT_CY or
VarEnum
.VT_FILETIME, 8) => rawValue,
412
(
VarEnum
.VT_RECORD or
VarEnum
.VT_RECORD |
VarEnum
.VT_BYREF, _) when sizeof(T) == sizeof(Record) => rawValue,
414
_ when vt.HasFlag(
VarEnum
.VT_BYREF) && sizeof(T) == nint.Size => rawValue,
415
_ when vt.HasFlag(
VarEnum
.VT_VECTOR) && sizeof(T) == sizeof(Vector<byte>) => rawValue,
416
_ when vt.HasFlag(
VarEnum
.VT_ARRAY) && sizeof(T) == nint.Size => rawValue,
417
(
VarEnum
.VT_BLOB or
VarEnum
.VT_BLOB_OBJECT, _) when sizeof(T) == sizeof(Blob) => rawValue,
425
/// A <see cref="ComVariant"/> instance that represents a null value with <see cref="
VarEnum
.VT_NULL"/> type.
427
public static ComVariant Null { get; } = new() { VarType =
VarEnum
.VT_NULL };
429
private readonly void ThrowIfNotVarType(params
VarEnum
[] requiredType)
446
if (VarType ==
VarEnum
.VT_EMPTY)
452
ThrowIfNotVarType(
VarEnum
.VT_NULL);
457
ThrowIfNotVarType(
VarEnum
.VT_I2);
462
ThrowIfNotVarType(
VarEnum
.VT_I4,
VarEnum
.VT_ERROR,
VarEnum
.VT_INT);
467
ThrowIfNotVarType(
VarEnum
.VT_R4);
472
ThrowIfNotVarType(
VarEnum
.VT_R8);
477
ThrowIfNotVarType(
VarEnum
.VT_CY);
482
ThrowIfNotVarType(
VarEnum
.VT_DATE);
487
ThrowIfNotVarType(
VarEnum
.VT_BSTR);
494
ThrowIfNotVarType(
VarEnum
.VT_BSTR);
503
ThrowIfNotVarType(
VarEnum
.VT_ERROR);
509
ThrowIfNotVarType(
VarEnum
.VT_BOOL);
516
ThrowIfNotVarType(
VarEnum
.VT_DECIMAL);
520
variantWithoutVarType.VarType =
VarEnum
.VT_EMPTY;
525
ThrowIfNotVarType(
VarEnum
.VT_I1);
530
ThrowIfNotVarType(
VarEnum
.VT_UI1);
535
ThrowIfNotVarType(
VarEnum
.VT_UI2);
540
ThrowIfNotVarType(
VarEnum
.VT_UI4,
VarEnum
.VT_UINT);
545
ThrowIfNotVarType(
VarEnum
.VT_I8);
550
ThrowIfNotVarType(
VarEnum
.VT_UI8);
560
public
VarEnum
VarType
562
readonly get => (
VarEnum
)_typeUnion._vt;
src\System\Reflection\MdImport.cs (1)
289
attribute.SafeArraySubType = (
VarEnum
)safeArraySubTypeRaw;
src\System\StubHelpers.cs (18)
915
VarEnum
vt;
919
case TypeCode.SByte: vt =
VarEnum
.VT_I1; break;
920
case TypeCode.Byte: vt =
VarEnum
.VT_UI1; break;
921
case TypeCode.Int16: vt =
VarEnum
.VT_I2; break;
922
case TypeCode.UInt16: vt =
VarEnum
.VT_UI2; break;
923
case TypeCode.Int32: vt =
VarEnum
.VT_I4; break;
924
case TypeCode.UInt32: vt =
VarEnum
.VT_UI4; break;
925
case TypeCode.Int64: vt =
VarEnum
.VT_I8; break;
926
case TypeCode.UInt64: vt =
VarEnum
.VT_UI8; break;
927
case TypeCode.Single: vt =
VarEnum
.VT_R4; break;
928
case TypeCode.Double: vt =
VarEnum
.VT_R8; break;
929
case TypeCode.Char: vt = (IsAnsi(dwFlags) ? (
VarEnum
)VTHACK_ANSICHAR :
VarEnum
.VT_UI2); break;
930
case TypeCode.Boolean: vt = (
VarEnum
)VTHACK_WINBOOL; break;
936
vt = (IntPtr.Size == 4 ?
VarEnum
.VT_I4 :
VarEnum
.VT_I8);
940
vt = (IntPtr.Size == 4 ?
VarEnum
.VT_UI4 :
VarEnum
.VT_UI8);
System.Reflection.Emit (10)
System\Reflection\Emit\PseudoCustomAttributesData.cs (10)
140
private const
VarEnum
InvalidVariantType = (
VarEnum
)Invalid;
200
VarEnum
safeArrayElementSubtype = (
VarEnum
)_marshalArrayElementType;
268
internal void SetMarshalAsSafeArray(
VarEnum
? elementType, string? type)
388
VarEnum
? elementTypeVariant = null;
397
elementTypeVariant = (
VarEnum
)values[i]!;
413
case
VarEnum
.VT_DISPATCH:
414
case
VarEnum
.VT_UNKNOWN:
415
case
VarEnum
.VT_RECORD:
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (1)
212
ma.SafeArraySubType = (
VarEnum
)br.ReadCompressedInteger();
System.Runtime.InteropServices (105)
artifacts\obj\System.Runtime.InteropServices\Debug\net10.0\System.Runtime.InteropServices.Forwards.cs (1)
149
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.
VarEnum
))]
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (104)
100
variant = ComVariant.CreateRaw(
VarEnum
.VT_UNKNOWN, StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateComInterfaceForObject(wrapped, CreateComInterfaceFlags.None));
105
variant = ComVariant.CreateRaw(
VarEnum
.VT_UNKNOWN, StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateComInterfaceForObject(managed, CreateComInterfaceFlags.None));
125
case
VarEnum
.VT_EMPTY:
126
case
VarEnum
.VT_BYREF |
VarEnum
.VT_EMPTY:
128
case
VarEnum
.VT_NULL:
129
case
VarEnum
.VT_BYREF |
VarEnum
.VT_NULL:
131
case
VarEnum
.VT_I1:
133
case
VarEnum
.VT_UI1:
135
case
VarEnum
.VT_I2:
137
case
VarEnum
.VT_UI2:
139
case
VarEnum
.VT_INT:
140
case
VarEnum
.VT_I4:
142
case
VarEnum
.VT_UINT:
143
case
VarEnum
.VT_UI4:
145
case
VarEnum
.VT_I8:
147
case
VarEnum
.VT_UI8:
149
case
VarEnum
.VT_R4:
151
case
VarEnum
.VT_R8:
153
case
VarEnum
.VT_DECIMAL:
155
case
VarEnum
.VT_BOOL:
157
case
VarEnum
.VT_BSTR:
159
case
VarEnum
.VT_DATE:
161
case
VarEnum
.VT_ERROR:
163
case
VarEnum
.VT_CY:
165
case
VarEnum
.VT_UNKNOWN:
166
case
VarEnum
.VT_DISPATCH:
168
case
VarEnum
.VT_BYREF |
VarEnum
.VT_VARIANT:
170
case
VarEnum
.VT_BYREF |
VarEnum
.VT_I1:
172
case
VarEnum
.VT_BYREF |
VarEnum
.VT_UI1:
174
case
VarEnum
.VT_BYREF |
VarEnum
.VT_I2:
176
case
VarEnum
.VT_BYREF |
VarEnum
.VT_UI2:
178
case
VarEnum
.VT_BYREF |
VarEnum
.VT_I4:
180
case
VarEnum
.VT_BYREF |
VarEnum
.VT_UI4:
182
case
VarEnum
.VT_BYREF |
VarEnum
.VT_I8:
184
case
VarEnum
.VT_BYREF |
VarEnum
.VT_UI8:
186
case
VarEnum
.VT_BYREF |
VarEnum
.VT_R4:
188
case
VarEnum
.VT_BYREF |
VarEnum
.VT_R8:
190
case
VarEnum
.VT_BYREF |
VarEnum
.VT_DECIMAL:
192
case
VarEnum
.VT_BYREF |
VarEnum
.VT_BOOL:
194
case
VarEnum
.VT_BYREF |
VarEnum
.VT_BSTR:
196
case
VarEnum
.VT_BYREF |
VarEnum
.VT_DATE:
198
case
VarEnum
.VT_BYREF |
VarEnum
.VT_ERROR:
200
case
VarEnum
.VT_BYREF |
VarEnum
.VT_CY:
202
case
VarEnum
.VT_BYREF |
VarEnum
.VT_UNKNOWN:
219
/// existing data storage if the variant has <see cref="
VarEnum
.VT_BYREF"/> type.
245
if (!_unmanaged.VarType.HasFlag(
VarEnum
.VT_BYREF))
251
&& (_unmanaged.VarType & ~
VarEnum
.VT_BYREF) is
252
VarEnum
.VT_BSTR
253
or
VarEnum
.VT_DISPATCH
254
or
VarEnum
.VT_UNKNOWN)
262
switch ((_unmanaged.VarType & ~
VarEnum
.VT_BYREF, _managed))
264
case (
VarEnum
.VT_VARIANT, _):
267
case (
VarEnum
.VT_I1 or
VarEnum
.VT_UI1, sbyte s):
270
case (
VarEnum
.VT_I1 or
VarEnum
.VT_UI1, byte b):
273
case (
VarEnum
.VT_I2 or
VarEnum
.VT_UI2, short s):
276
case (
VarEnum
.VT_I2 or
VarEnum
.VT_UI2, ushort u):
279
case (
VarEnum
.VT_I4 or
VarEnum
.VT_INT or
VarEnum
.VT_UI4 or
VarEnum
.VT_UINT or
VarEnum
.VT_ERROR, int i):
282
case (
VarEnum
.VT_I4 or
VarEnum
.VT_INT or
VarEnum
.VT_UI4 or
VarEnum
.VT_UINT or
VarEnum
.VT_ERROR, uint u):
285
case (
VarEnum
.VT_I8 or
VarEnum
.VT_UI8, long l):
288
case (
VarEnum
.VT_I8 or
VarEnum
.VT_UI8, ulong ul):
291
case (
VarEnum
.VT_R4, float f):
294
case (
VarEnum
.VT_R8, double d):
297
case (
VarEnum
.VT_DECIMAL, decimal d):
300
case (
VarEnum
.VT_BOOL, bool b):
303
case (
VarEnum
.VT_BSTR, string str):
310
case (
VarEnum
.VT_BSTR, BStrWrapper str):
317
case (
VarEnum
.VT_DATE, DateTime dt):
320
case (
VarEnum
.VT_ERROR, ErrorWrapper error):
323
case (
VarEnum
.VT_CY, CurrencyWrapper cy):
326
case (
VarEnum
.VT_UNKNOWN, object unkObj):
UIAutomationClient (12)
MS\Internal\Automation\UiaCoreApi.cs (12)
327
[MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)] object[,] pRequestedData,
1228
private static extern int RawUiaNavigate(SafeNodeHandle hnode, NavigateDirection direction, SafeConditionMemoryHandle condition, UiaMiniCacheRequest pRequest, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)] out object[,] requestedData, [MarshalAs(UnmanagedType.BStr)] out string treeStructure);
1231
private static extern int RawUiaFind(SafeNodeHandle hnode, ref UiaFindParams pParams, UiaMiniCacheRequest pRequest, [MarshalAs(UnmanagedType.SafeArray)] out object[,] requestedData, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_I4)] out int[] offsets, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_BSTR)] out string[] treeStructures);
1243
private static extern int RawUiaNodeFromPoint(double x, double y, UiaMiniCacheRequest request, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)] out object[,] requestedData, [MarshalAs(UnmanagedType.BStr)] out string treeStructure);
1246
private static extern int RawUiaNodeFromFocus(UiaMiniCacheRequest pRequest, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)] out object[,] requestedData, [MarshalAs(UnmanagedType.BStr)] out string treeStructure);
1249
private static extern int RawUiaGetUpdatedCache(SafeNodeHandle hnode, UiaMiniCacheRequest pRequest, NormalizeState normalizeState, SafeConditionMemoryHandle pNormalizeCondition, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)] out object[,] requestedData, [MarshalAs(UnmanagedType.BStr)] out string treeStructure);
1369
private static extern int RawTextPattern_GetSelection(SafePatternHandle hobj, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)]out object[] result);
1372
private static extern int RawTextPattern_GetVisibleRanges(SafePatternHandle hobj, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_VARIANT)]out object[] result);
1408
private static extern int RawTextRange_GetBoundingRectangles(SafeTextRangeHandle hobj, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_R8)] out double[] result);
1438
private static extern int RawTextRange_GetChildren(SafeTextRangeHandle hobj, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_UNKNOWN)] out object[] result);
1549
[return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum
.VT_UNKNOWN)]