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)
23VARIANT 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)
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)
15public static VARIANT Empty { get; } 17public static VARIANT True { get; } = CreateBoolVariant(value: true); 19public static VARIANT False { get; } = CreateBoolVariant(value: false); 21private static VARIANT CreateBoolVariant(bool value) 23VARIANT variant = new() { vt = VT_BOOL }; 78fixed (VARIANT* thisVariant = &this) 183VARIANT* pVariant = (VARIANT*)data; 401Span<VARIANT> data = new(psa->pvData, array.Length); 611VARIANT data = psa->GetValue<VARIANT>(indices); 724return (uint)sizeof(VARIANT); 850Span<VARIANT> data = new(ca.pElems, (int)ca.cElems); 871public static explicit operator bool(VARIANT value) 875public static explicit operator VARIANT(bool value) 879public static explicit operator short(VARIANT value) 883public static explicit operator VARIANT(short value) 891public static explicit operator int(VARIANT value) 895public static explicit operator VARIANT(int value) 904public static explicit operator uint(VARIANT value) 908public static explicit operator VARIANT(uint value) 917public static explicit operator BSTR(VARIANT value) 921public static explicit operator VARIANT(string value) 930public static explicit operator VARIANT(BSTR value) 938public static explicit operator CY(VARIANT value) 941public static explicit operator decimal(VARIANT value) => value.vt switch 949public static explicit operator VARIANT(IUnknown* value) 957public static explicit operator IUnknown*(VARIANT value) 961public static explicit operator double(VARIANT value) 965public static explicit operator VARIANT(double value) 976/// Converts the given object to <see cref="VARIANT"/>. 978public static VARIANT FromObject(object? value) 987return (VARIANT)stringValue; 991return (VARIANT)boolValue; 995return (VARIANT)shortValue; 999return (VARIANT)intValue; 1003return (VARIANT)uintValue; 1007return (VARIANT)doubleValue; 1013VARIANT 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)
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)
434using 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(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);