9 instantiations of VARIANT
System.Private.Windows.Core (9)
Windows\Win32\System\Com\SafeArrayScope.cs (1)
250public 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)
24VARIANT 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)
17VARIANT* pVar, 25VARIANT* pVar, 76internal VARIANT GetProperty( 83internal VARIANT GetProperty( 87VARIANT variant = default; 92public HRESULT SetPropertyValue(int dispatchId, VARIANT value, out string? errorText)
Windows\Win32\System\Com\IDispatch.Interface.cs (2)
41VARIANT* pVarResult, 78VARIANT* pVarResult,
Windows\Win32\System\Com\SAFEARRAY.cs (1)
56else if (hardwiredType == FADF_VARIANT && cbElements == sizeof(VARIANT))
Windows\Win32\System\Com\SafeArrayScope.cs (5)
173using VARIANT result = GetElement<VARIANT>(i); 185using VARIANT variant = VARIANT.FromObject(value); 250public 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)
16public static VARIANT Empty { get; } 18public static VARIANT True { get; } = CreateBoolVariant(value: true); 20public static VARIANT False { get; } = CreateBoolVariant(value: false); 22private static VARIANT CreateBoolVariant(bool value) 24VARIANT variant = new() { vt = VT_BOOL }; 79fixed (VARIANT* thisVariant = &this) 184VARIANT* pVariant = (VARIANT*)data; 402Span<VARIANT> data = new(psa->pvData, array.Length); 612VARIANT data = psa->GetValue<VARIANT>(indices); 725return (uint)sizeof(VARIANT); 851Span<VARIANT> data = new(ca.pElems, (int)ca.cElems); 872public static explicit operator bool(VARIANT value) 876public static explicit operator VARIANT(bool value) 880public static explicit operator short(VARIANT value) 884public static explicit operator VARIANT(short value) 892public static explicit operator int(VARIANT value) 896public static explicit operator VARIANT(int value) 905public static explicit operator uint(VARIANT value) 909public static explicit operator VARIANT(uint value) 918public static explicit operator BSTR(VARIANT value) 922public static explicit operator VARIANT(string value) 931public static explicit operator VARIANT(BSTR value) 939public static explicit operator CY(VARIANT value) 942public static explicit operator decimal(VARIANT value) => value.vt switch 950public static explicit operator VARIANT(IUnknown* value) 958public static explicit operator IUnknown*(VARIANT value) 962public static explicit operator double(VARIANT value) 966public static explicit operator VARIANT(double value) 977/// Converts the given object to <see cref="VARIANT"/>. 979public static VARIANT FromObject(object? value) 988return (VARIANT)stringValue; 992return (VARIANT)boolValue; 996return (VARIANT)shortValue; 1000return (VARIANT)intValue; 1004return (VARIANT)uintValue; 1008return (VARIANT)doubleValue; 1014VARIANT variant = default;
Windows\Win32\System\Variant\VARIANTVector.cs (4)
10public VARIANT[] Variants; 20var variants = new VARIANT[values.Length]; 21fixed (VARIANT* pVariants = variants) 34foreach (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)
435using var variantValue = VARIANT.FromObject(value);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (3)
1315using var variantTargetFrameName = VARIANT.FromObject(targetFrameName); 1316using var variantPostData = VARIANT.FromObject(postData); 1317using 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)
300var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (1)
741var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (1)
274var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (2)
171var actual = listBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionIsSelectionRequiredPropertyId); 192var actual = listBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionCanSelectMultiplePropertyId);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (1)
1768var actual = listViewAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_SelectionCanSelectMultiplePropertyId);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
975var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (1)
22var accessibleName = menuStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\ScrollBar.ScrollBarAccessibleObjectTests.cs (1)
152var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (1)
22var accessibleName = statusStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (1)
789var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (1)
518var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (1)
32var accessibleName = toolStripAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxAccessibleObjectTests.cs (1)
20var accessibleName = toolStripTextBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (1)
471var result = accessibleObject.GetPropertyValue((UIA_PROPERTY_ID)propertyId);
System\Windows\Forms\HtmlDocumentTests.cs (5)
96using var variantValue = VARIANT.FromObject(value); 311using var variantValue = VARIANT.FromObject(value); 791using var variantValue = VARIANT.FromObject(value); 980using var variantValue = VARIANT.FromObject(value); 1343using var variantValue = VARIANT.FromObject(value);