1 write to _unmanaged
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (1)
230
public void FromUnmanaged(ComVariant unmanaged) =>
_unmanaged
= unmanaged;
27 references to _unmanaged
System.Runtime.InteropServices (27)
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (27)
245
if (!
_unmanaged
.VarType.HasFlag(VarEnum.VT_BYREF))
251
&& (
_unmanaged
.VarType & ~VarEnum.VT_BYREF) is
256
*(IntPtr*)
_unmanaged
.GetRawDataRef<nint>() = default;
257
return
_unmanaged
;
262
switch ((
_unmanaged
.VarType & ~VarEnum.VT_BYREF, _managed))
265
*(ComVariant*)
_unmanaged
.GetRawDataRef<nint>() = ConvertToUnmanaged(_managed);
268
*(sbyte*)
_unmanaged
.GetRawDataRef<nint>() = s;
271
*(byte*)
_unmanaged
.GetRawDataRef<nint>() = b;
274
*(short*)
_unmanaged
.GetRawDataRef<nint>() = s;
277
*(ushort*)
_unmanaged
.GetRawDataRef<nint>() = u;
280
*(int*)
_unmanaged
.GetRawDataRef<nint>() = i;
283
*(uint*)
_unmanaged
.GetRawDataRef<nint>() = u;
286
*(long*)
_unmanaged
.GetRawDataRef<nint>() = l;
289
*(ulong*)
_unmanaged
.GetRawDataRef<nint>() = ul;
292
*(float*)
_unmanaged
.GetRawDataRef<nint>() = f;
295
*(double*)
_unmanaged
.GetRawDataRef<nint>() = d;
298
*(decimal*)
_unmanaged
.GetRawDataRef<nint>() = d;
301
*(short*)
_unmanaged
.GetRawDataRef<nint>() = b ? VARIANT_TRUE : VARIANT_FALSE;
305
ref IntPtr bstrStorage = ref *(IntPtr*)
_unmanaged
.GetRawDataRef<nint>();
312
ref IntPtr bstrStorage = ref *(IntPtr*)
_unmanaged
.GetRawDataRef<nint>();
318
*(double*)
_unmanaged
.GetRawDataRef<nint>() = dt.ToOADate();
321
*(int*)
_unmanaged
.GetRawDataRef<nint>() = error.ErrorCode;
324
*(long*)
_unmanaged
.GetRawDataRef<nint>() = decimal.ToOACurrency(cy.WrappedObject);
327
*(IntPtr*)
_unmanaged
.GetRawDataRef<nint>() = StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateComInterfaceForObject(unkObj, CreateComInterfaceFlags.None);
335
return
_unmanaged
;
342
public object? ToManaged() => ConvertToManaged(
_unmanaged
);
347
public void Free() =>
_unmanaged
.Dispose();