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)
23
VARIANT variant =
new
() { vt = VT_BOOL };
884
=>
new
()
896
=>
new
()
909
=>
new
()
922
=>
new
()
931
=>
new
()
950
=>
new
()
966
=>
new
()
101 references to VARIANT
System.Private.Windows.Core (58)
Windows\Win32\Foundation\HRESULT.cs (1)
88
/// Visual Basic 6 and VBA raise this when objects have been collected or <see cref="
VARIANT
"/> values
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)
15
public static
VARIANT
Empty { get; }
17
public static
VARIANT
True { get; } = CreateBoolVariant(value: true);
19
public static
VARIANT
False { get; } = CreateBoolVariant(value: false);
21
private static
VARIANT
CreateBoolVariant(bool value)
23
VARIANT
variant = new() { vt = VT_BOOL };
78
fixed (
VARIANT
* thisVariant = &this)
183
VARIANT
* pVariant = (
VARIANT
*)data;
401
Span<
VARIANT
> data = new(psa->pvData, array.Length);
611
VARIANT
data = psa->GetValue<
VARIANT
>(indices);
724
return (uint)sizeof(
VARIANT
);
850
Span<
VARIANT
> data = new(ca.pElems, (int)ca.cElems);
871
public static explicit operator bool(
VARIANT
value)
875
public static explicit operator
VARIANT
(bool value)
879
public static explicit operator short(
VARIANT
value)
883
public static explicit operator
VARIANT
(short value)
891
public static explicit operator int(
VARIANT
value)
895
public static explicit operator
VARIANT
(int value)
904
public static explicit operator uint(
VARIANT
value)
908
public static explicit operator
VARIANT
(uint value)
917
public static explicit operator BSTR(
VARIANT
value)
921
public static explicit operator
VARIANT
(string value)
930
public static explicit operator
VARIANT
(BSTR value)
938
public static explicit operator CY(
VARIANT
value)
941
public static explicit operator decimal(
VARIANT
value) => value.vt switch
949
public static explicit operator
VARIANT
(IUnknown* value)
957
public static explicit operator IUnknown*(
VARIANT
value)
961
public static explicit operator double(
VARIANT
value)
965
public static explicit operator
VARIANT
(double value)
976
/// Converts the given object to <see cref="
VARIANT
"/>.
978
public static
VARIANT
FromObject(object? value)
987
return (
VARIANT
)stringValue;
991
return (
VARIANT
)boolValue;
995
return (
VARIANT
)shortValue;
999
return (
VARIANT
)intValue;
1003
return (
VARIANT
)uintValue;
1007
return (
VARIANT
)doubleValue;
1013
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)
213
/// Determines if <see cref="GetKeyboardShortcutInternal(
VARIANT
)"/> can be called without calling <see cref="KeyboardShortcut"/>
403
/// Mechanism for overriding default <see cref="UIA.IAccessible.accNavigate(int,
VARIANT
,
VARIANT
*)"/>
604
/// element in the form of a <see cref="
VARIANT
"/>. See
606
/// which outlines how the <see cref="
VARIANT
"/> should be defined for each <see cref="UIA_PROPERTY_ID"/>
610
/// <returns>The requested value if supported or <see cref="
VARIANT
.Empty"/> if it is not.</returns>
2782
/// Called prior to calling <see cref="UIA.IAccessible.get_accName(
VARIANT
, BSTR*)"/> on the 'inner' system
2809
/// <inheritdoc cref="IsValidSelfChildID(
VARIANT
)"/>
2815
/// 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)
434
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(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);