9 writes to vt
System.Private.Windows.Core (9)
Windows\Win32\System\Com\SafeArrayScope.cs (1)
250
public static explicit operator VARIANT(in SafeArrayScope<T> scope) => new() {
vt
= VARENUM.VT_ARRAY | scope.Value->VarType, data = new() { parray = (SAFEARRAY*)scope._value } };
Windows\Win32\System\Variant\VARIANT.cs (8)
24
VARIANT variant = new() {
vt
= VT_BOOL };
887
vt
= VT_I2,
900
vt
= VT_I4,
913
vt
= VT_UI4,
926
vt
= VT_BSTR,
934
vt
= VT_BSTR,
953
vt
= VT_UNKNOWN,
969
vt
= VT_R8,
18 references to vt
System.Private.Windows.Core (18)
Windows\Win32\System\Variant\VARIANT.cs (18)
29
public bool IsEmpty =>
vt
== VT_EMPTY && data.llVal == 0;
31
public VARENUM Type =>
vt
& VT_TYPEMASK;
33
public bool Byref =>
vt
.HasFlag(VT_BYREF);
74
if (
vt
== VT_DECIMAL)
95
if ((
vt
& ~(VT_BYREF | VT_ARRAY | VT_VECTOR)) >= (VARENUM)0x80)
100
if ((
vt
& VT_VECTOR) != 0)
102
return ToVector(thisVariant->data.ca,
vt
);
105
if ((
vt
& VT_ARRAY) != 0)
107
return ToArray(*(SAFEARRAY**)data,
vt
);
873
=> value.
vt
== VT_BOOL ? value.data.boolVal != VARIANT_BOOL.VARIANT_FALSE : ThrowInvalidCast<bool>();
881
=> value.
vt
== VT_I2 ? value.data.iVal : ThrowInvalidCast<short>();
893
=> value.
vt
is VT_I4 or VT_INT ? value.data.intVal : ThrowInvalidCast<int>();
906
=> value.
vt
is VT_UI4 or VT_UINT ? value.data.uintVal : ThrowInvalidCast<uint>();
919
=> value.
vt
== VT_BSTR ? value.data.bstrVal : ThrowInvalidCast<BSTR>();
940
=> value.
vt
== VT_CY ? value.data.cyVal : ThrowInvalidCast<CY>();
942
public static explicit operator decimal(VARIANT value) => value.
vt
switch
959
=> value.
vt
== VT_UNKNOWN ? value.data.punkVal : throw new InvalidCastException();
963
=> value.
vt
== VT_R8 ? value.data.dblVal : ThrowInvalidCast<double>();