37 references to SAFEARRAY
System.Private.Windows.Core (31)
Windows\Win32\System\Com\SAFEARRAY.cs (2)
27public static SAFEARRAY* CreateEmpty(VARENUM arrayType) 63fixed (SAFEARRAY* pThis = &this)
Windows\Win32\System\Com\SafeArrayScope.cs (20)
10/// Helper to scope lifetime of a <see cref="SAFEARRAY"/> created via 12/// Destroys the <see cref="SAFEARRAY"/> (if any) when disposed. Note that this scope currently only works for a 13/// one dimensional <see cref="SAFEARRAY"/>. 17/// Use in a <see langword="using" /> statement to ensure the <see cref="SAFEARRAY"/> gets disposed. 20/// If the <see cref="SAFEARRAY"/> you are intending to scope the lifetime of has type <see cref="VARENUM.VT_UNKNOWN"/>, 28public SAFEARRAY* Value => (SAFEARRAY*)_value; 30public SafeArrayScope(SAFEARRAY* value) 143/// A copy will be made of anything that is put into the <see cref="SAFEARRAY"/> 144/// and anything the <see cref="SAFEARRAY"/> gives out is a copy and has been add ref appropriately if applicable. 145/// Be sure to dispose of items that are given to the <see cref="SAFEARRAY"/> if necessary. All 146/// items given out by the <see cref="SAFEARRAY"/> should be disposed. 224PInvokeCore.SafeArrayPutElement((SAFEARRAY*)_value, pIndices, value).ThrowOnFailure(); 236SAFEARRAY* safeArray = (SAFEARRAY*)_value; 249public static explicit operator VARIANT(in SafeArrayScope<T> scope) => new() { vt = VARENUM.VT_ARRAY | scope.Value->VarType, data = new() { parray = (SAFEARRAY*)scope._value } }; 251public static implicit operator SAFEARRAY*(in SafeArrayScope<T> scope) => (SAFEARRAY*)scope._value; 256public static implicit operator SAFEARRAY**(in SafeArrayScope<T> scope) => (SAFEARRAY**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value));
Windows\Win32\System\Variant\VARIANT.cs (9)
107return ToArray(*(SAFEARRAY**)data, vt); 248private static Array? ToArray(SAFEARRAY* psa, VARENUM vt) 440private static void TransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 452static void StackTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 460static void HeapTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 468static void InternalTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper) 505private static void SetArrayValue(SAFEARRAY* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType) 622private static Array CreateArrayFromSafeArray(SAFEARRAY* psa, VARENUM vt) 739return (uint)sizeof(SAFEARRAY*);
System.Windows.Forms.Primitives (6)
Windows\Win32\System\Com\ComSafeArrayScope.cs (6)
9/// Helper to scope lifetime of a <see cref="SAFEARRAY"/> created via 11/// that holds COM pointers. Destroys the <see cref="SAFEARRAY"/> (if any) when disposed. Note that this scope 12/// currently only works for a one dimensional <see cref="SAFEARRAY"/> of type <see cref="VARENUM.VT_UNKNOWN"/> 16/// Use in a <see langword="using" /> statement to ensure the <see cref="SAFEARRAY"/> gets disposed. 46/// The <see cref="SAFEARRAY"/> will ref count the COM pointer on get/put. 47/// Be sure to release of COM pointers that are given to/from the <see cref="SAFEARRAY"/>.