37 references to SAFEARRAY
System.Private.Windows.Core (31)
Windows\Win32\System\Com\SAFEARRAY.cs (2)
27
public static
SAFEARRAY
* CreateEmpty(VARENUM arrayType)
63
fixed (
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"/>,
28
public
SAFEARRAY
* Value => (
SAFEARRAY
*)_value;
30
public SafeArrayScope(
SAFEARRAY
* value)
144
/// A copy will be made of anything that is put into the <see cref="
SAFEARRAY
"/>
145
/// and anything the <see cref="
SAFEARRAY
"/> gives out is a copy and has been add ref appropriately if applicable.
146
/// Be sure to dispose of items that are given to the <see cref="
SAFEARRAY
"/> if necessary. All
147
/// items given out by the <see cref="
SAFEARRAY
"/> should be disposed.
225
PInvokeCore.SafeArrayPutElement((
SAFEARRAY
*)_value, pIndices, value).ThrowOnFailure();
237
SAFEARRAY
* safeArray = (
SAFEARRAY
*)_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 } };
252
public static implicit operator
SAFEARRAY
*(in SafeArrayScope<T> scope) => (
SAFEARRAY
*)scope._value;
257
public static implicit operator
SAFEARRAY
**(in SafeArrayScope<T> scope) => (
SAFEARRAY
**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value));
Windows\Win32\System\Variant\VARIANT.cs (9)
107
return ToArray(*(
SAFEARRAY
**)data, vt);
248
private static Array? ToArray(
SAFEARRAY
* psa, VARENUM vt)
440
private static void TransposeArray(
SAFEARRAY
* psa, Array array, VARENUM arrayType)
452
static void StackTransposeArray(
SAFEARRAY
* psa, Array array, VARENUM arrayType)
460
static void HeapTransposeArray(
SAFEARRAY
* psa, Array array, VARENUM arrayType)
468
static void InternalTransposeArray(
SAFEARRAY
* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper)
505
private static void SetArrayValue(
SAFEARRAY
* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType)
622
private static Array CreateArrayFromSafeArray(
SAFEARRAY
* psa, VARENUM vt)
739
return (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
"/>.