9 instantiations of VARIANT
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 };
885
=>
new
()
897
=>
new
()
910
=>
new
()
923
=>
new
()
932
=>
new
()
951
=>
new
()
967
=>
new
()
100 references to VARIANT
System.Private.Windows.Core (57)
Windows\Win32\System\Com\IDispatch.cs (6)
17
VARIANT
* pVar,
25
VARIANT
* pVar,
76
internal
VARIANT
GetProperty(
83
internal
VARIANT
GetProperty(
87
VARIANT
variant = default;
92
public HRESULT SetPropertyValue(int dispatchId,
VARIANT
value, out string? errorText)
Windows\Win32\System\Com\IDispatch.Interface.cs (2)
41
VARIANT
* pVarResult,
78
VARIANT
* pVarResult,
Windows\Win32\System\Com\SAFEARRAY.cs (1)
56
else if (hardwiredType == FADF_VARIANT && cbElements == sizeof(
VARIANT
))
Windows\Win32\System\Com\SafeArrayScope.cs (5)
173
using
VARIANT
result = GetElement<
VARIANT
>(i);
185
using
VARIANT
variant =
VARIANT
.FromObject(value);
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 (39)
16
public static
VARIANT
Empty { get; }
18
public static
VARIANT
True { get; } = CreateBoolVariant(value: true);
20
public static
VARIANT
False { get; } = CreateBoolVariant(value: false);
22
private static
VARIANT
CreateBoolVariant(bool value)
24
VARIANT
variant = new() { vt = VT_BOOL };
79
fixed (
VARIANT
* thisVariant = &this)
184
VARIANT
* pVariant = (
VARIANT
*)data;
402
Span<
VARIANT
> data = new(psa->pvData, array.Length);
612
VARIANT
data = psa->GetValue<
VARIANT
>(indices);
725
return (uint)sizeof(
VARIANT
);
851
Span<
VARIANT
> data = new(ca.pElems, (int)ca.cElems);
872
public static explicit operator bool(
VARIANT
value)
876
public static explicit operator
VARIANT
(bool value)
880
public static explicit operator short(
VARIANT
value)
884
public static explicit operator
VARIANT
(short value)
892
public static explicit operator int(
VARIANT
value)
896
public static explicit operator
VARIANT
(int value)
905
public static explicit operator uint(
VARIANT
value)
909
public static explicit operator
VARIANT
(uint value)
918
public static explicit operator BSTR(
VARIANT
value)
922
public static explicit operator
VARIANT
(string value)
931
public static explicit operator
VARIANT
(BSTR value)
939
public static explicit operator CY(
VARIANT
value)
942
public static explicit operator decimal(
VARIANT
value) => value.vt switch
950
public static explicit operator
VARIANT
(IUnknown* value)
958
public static explicit operator IUnknown*(
VARIANT
value)
962
public static explicit operator double(
VARIANT
value)
966
public static explicit operator
VARIANT
(double value)
977
/// Converts the given object to <see cref="
VARIANT
"/>.
979
public static
VARIANT
FromObject(object? value)
988
return (
VARIANT
)stringValue;
992
return (
VARIANT
)boolValue;
996
return (
VARIANT
)shortValue;
1000
return (
VARIANT
)intValue;
1004
return (
VARIANT
)uintValue;
1008
return (
VARIANT
)doubleValue;
1014
VARIANT
variant = default;
Windows\Win32\System\Variant\VARIANTVector.cs (4)
10
public
VARIANT
[] Variants;
20
var variants = new
VARIANT
[values.Length];
21
fixed (
VARIANT
* pVariants = variants)
34
foreach (
VARIANT
variant in Variants)
System.Windows.Forms (14)
System\Windows\Forms\Accessibility\AccessibleObject.cs (9)
214
/// Determines if <see cref="GetKeyboardShortcutInternal(
VARIANT
)"/> can be called without calling <see cref="KeyboardShortcut"/>
404
/// Mechanism for overriding default <see cref="UIA.IAccessible.accNavigate(int,
VARIANT
,
VARIANT
*)"/>
605
/// element in the form of a <see cref="
VARIANT
"/>. See
607
/// which outlines how the <see cref="
VARIANT
"/> should be defined for each <see cref="UIA_PROPERTY_ID"/>
611
/// <returns>The requested value if supported or <see cref="
VARIANT
.Empty"/> if it is not.</returns>
2783
/// Called prior to calling <see cref="UIA.IAccessible.get_accName(
VARIANT
, BSTR*)"/> on the 'inner' system
2810
/// <inheritdoc cref="IsValidSelfChildID(
VARIANT
)"/>
2816
/// where the additional terms is to be respected alongside <see cref="IsValidSelfChildID(
VARIANT
)"/>.
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
599
/// returned <see cref="
VARIANT
"/> after using it.
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
435
using
var
variantValue = VARIANT.FromObject(value);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (3)
1315
using
var
variantTargetFrameName = VARIANT.FromObject(targetFrameName);
1316
using
var
variantPostData = VARIANT.FromObject(postData);
1317
using
var
variantHeaders = VARIANT.FromObject(headers);
System.Windows.Forms.Primitives (9)
Microsoft\VisualStudio\Shell\IProvidePropertyBuilder.cs (1)
92
/// browser and are invoked through <see cref="ExecuteBuilder(int, BSTR*, IDispatch*, HWND,
VARIANT
*, VARIANT_BOOL*)"/>
Microsoft\VisualStudio\Shell\IVSMDPerPropertyBrowsing.cs (1)
56
/// <inheritdoc cref="Interface.GetPropertyAttributes(int, uint*, BSTR**,
VARIANT
**)"/>
Windows\Win32\System\Com\StructuredStorage\PropertyBagExtensions.cs (2)
10
/// <inheritdoc cref="IPropertyBag.Interface.Read(PCWSTR,
VARIANT
*, IErrorLog*)"/>
19
/// <inheritdoc cref="IPropertyBag.Interface.Write(PCWSTR,
VARIANT
*)"/>
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (1)
138
/// <see cref="IDispatchEx.InvokeEx(IDispatchEx*, int, uint, ushort, DISPPARAMS*,
VARIANT
*, EXCEPINFO*, Com.IServiceProvider*)"/>
Windows\Win32\UI\Accessibility\UIAHelper.cs (4)
11
/// Converts a window handle to a <see cref="
VARIANT
"/> for UIA purposes.
13
/// <see cref="IRawElementProviderSimple.GetPropertyValue(IRawElementProviderSimple*, UIA_PROPERTY_ID,
VARIANT
*)"/>
17
/// <returns>The <see cref="
VARIANT
"/> version of the window handle.</returns>
22
/// <see cref="IRawElementProviderSimple.GetPropertyValue(IRawElementProviderSimple*, UIA_PROPERTY_ID,
VARIANT
*)"/>
System.Windows.Forms.Tests (20)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxAccessibleObjectTests.cs (1)
300
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (1)
741
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (1)
274
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (2)
171
var
actual = listBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionIsSelectionRequiredPropertyId);
192
var
actual = listBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionCanSelectMultiplePropertyId);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (1)
1768
var
actual = listViewAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionCanSelectMultiplePropertyId);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
975
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (1)
22
var
accessibleName = menuStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\ScrollBar.ScrollBarAccessibleObjectTests.cs (1)
152
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (1)
22
var
accessibleName = statusStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (1)
789
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (1)
518
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (1)
32
var
accessibleName = toolStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxAccessibleObjectTests.cs (1)
20
var
accessibleName = toolStripTextBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (1)
471
var
result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\HtmlDocumentTests.cs (5)
96
using
var
variantValue = VARIANT.FromObject(value);
311
using
var
variantValue = VARIANT.FromObject(value);
791
using
var
variantValue = VARIANT.FromObject(value);
980
using
var
variantValue = VARIANT.FromObject(value);
1343
using
var
variantValue = VARIANT.FromObject(value);