Skip to content

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ file unsafe partial interface InterfaceImplementation
internal static int ABI_Get(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, sbyte* __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.IBool @this = default;
ref sbyte __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
sbyte __invokeRetValUnmanaged__out = default;
bool __invokeRetVal = default;
int __retVal = default;
try
Expand All @@ -65,11 +65,14 @@ internal static int ABI_Get(System.Runtime.InteropServices.ComWrappers.ComInterf
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IBool>(__this_native);
__invokeRetVal = @this.Get();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = (sbyte)(__invokeRetVal ? 1 : 0);
__invokeRetValUnmanaged__out = (sbyte)(__invokeRetVal ? 1 : 0);
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -92,6 +95,7 @@ internal static int ABI_Set(System.Runtime.InteropServices.ComWrappers.ComInterf
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ file unsafe partial interface InterfaceImplementation
internal static int ABI_GetString(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ushort** __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.ICustomStringMarshallingUtf16 @this = default;
ref ushort* __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
ushort* __invokeRetValUnmanaged__out = default;
string __invokeRetVal = default;
int __retVal = default;
try
Expand All @@ -73,11 +73,16 @@ internal static int ABI_GetString(System.Runtime.InteropServices.ComWrappers.Com
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.ICustomStringMarshallingUtf16>(__this_native);
__invokeRetVal = @this.GetString();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__invokeRetVal);
__invokeRetValUnmanaged__out = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__invokeRetVal);
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
// CleanupFailure - Perform required cleanup.
global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.Free(__invokeRetValUnmanaged__out);
return __retVal;
}

return __retVal;
Expand All @@ -100,6 +105,7 @@ internal static int ABI_SetString(System.Runtime.InteropServices.ComWrappers.Com
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ internal static int ABI_SetName(System.Runtime.InteropServices.ComWrappers.ComIn
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -120,7 +121,7 @@ internal static int ABI_SetName(System.Runtime.InteropServices.ComWrappers.ComIn
internal static int ABI_GetName(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ushort** __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.IDerived @this = default;
ref ushort* __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
ushort* __invokeRetValUnmanaged__out = default;
string __invokeRetVal = default;
int __retVal = default;
try
Expand All @@ -130,11 +131,16 @@ internal static int ABI_GetName(System.Runtime.InteropServices.ComWrappers.ComIn
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IDerived>(__this_native);
__invokeRetVal = @this.GetName();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__invokeRetVal);
__invokeRetValUnmanaged__out = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__invokeRetVal);
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
// CleanupFailure - Perform required cleanup.
global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.Free(__invokeRetValUnmanaged__out);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,36 +129,54 @@ internal static int ABI_Next(System.Runtime.InteropServices.ComWrappers.ComInter
{
global::SharedTypes.ComInterfaces.IEnumUnknown @this = default;
object[] rgelt = default;
ref uint __pceltFetched_native = ref *__pceltFetched_native__param;
uint __pceltFetched_native__out = default;
uint pceltFetched = default;
int __retVal = default;
// Setup - Perform required setup.
int __rgelt_native__numElements;
System.Runtime.CompilerServices.Unsafe.SkipInit(out __rgelt_native__numElements);
scoped System.Span<System.IntPtr> __rgelt_native__out = default;
try
{
// Unmarshal - Convert native data to managed data.
__retVal = 0; // S_OK
global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.GetManagedValuesDestination(rgelt).Clear();
__rgelt_native__numElements = -1;
rgelt = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.AllocateContainerForManagedElements(__rgelt_native, __rgelt_native__numElements);
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IEnumUnknown>(__this_native);
@this.Next(celt, rgelt, out pceltFetched);
// Marshal - Convert managed data to native data.
__pceltFetched_native = pceltFetched;
__pceltFetched_native__out = pceltFetched;
{
__rgelt_native__numElements = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.GetManagedValuesDestination(rgelt).Length;
System.Span<System.IntPtr> __rgelt_native__nativeSpan = System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.GetUnmanagedValuesSource(__rgelt_native, __rgelt_native__numElements).GetPinnableReference()), __rgelt_native__numElements);
__rgelt_native__out = stackalloc System.IntPtr[__rgelt_native__numElements];
System.Span<System.IntPtr> __rgelt_native__nativeSpan = __rgelt_native__out;
System.Span<object> __rgelt_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.GetManagedValuesDestination(rgelt);
for (int __i0 = 0; __i0 < __rgelt_native__numElements; ++__i0)
{
void* __rgelt_native__nativeSpan____i0__original = (void*)__rgelt_native__nativeSpan[__i0];
__rgelt_native__nativeSpan[__i0] = (System.IntPtr)(void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<object>.ConvertToUnmanaged(__rgelt_native__managedSpan[__i0]);
global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<object>.Free(__rgelt_native__nativeSpan____i0__original);
}
}

// AssignOut - Assign to parameters
*__pceltFetched_native__param = __pceltFetched_native__out;
__rgelt_native__out.CopyTo(System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<object, System.IntPtr>.GetUnmanagedValuesSource(__rgelt_native, __rgelt_native__numElements).GetPinnableReference()), __rgelt_native__numElements));
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
// CleanupFailure - Perform required cleanup.
{
System.ReadOnlySpan<System.IntPtr> __rgelt_native__nativeSpan = __rgelt_native__out;
for (int __i0 = 0; __i0 < __rgelt_native__nativeSpan.Length; ++__i0)
{
global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<object>.Free((void*)__rgelt_native__nativeSpan[__i0]);
}
}

__rgelt_native__numElements = -1;
return __retVal;
}

return __retVal;
Expand All @@ -179,6 +197,7 @@ internal static int ABI_Skip(System.Runtime.InteropServices.ComWrappers.ComInter
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -199,6 +218,7 @@ internal static int ABI_Reset(System.Runtime.InteropServices.ComWrappers.ComInte
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -208,7 +228,7 @@ internal static int ABI_Reset(System.Runtime.InteropServices.ComWrappers.ComInte
internal static int ABI_Clone(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __ppenum_native__param)
{
global::SharedTypes.ComInterfaces.IEnumUnknown @this = default;
ref void* __ppenum_native = ref *__ppenum_native__param;
void* __ppenum_native__out = default;
global::SharedTypes.ComInterfaces.IEnumUnknown ppenum = default;
int __retVal = default;
try
Expand All @@ -218,11 +238,16 @@ internal static int ABI_Clone(System.Runtime.InteropServices.ComWrappers.ComInte
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IEnumUnknown>(__this_native);
@this.Clone(out ppenum);
// Marshal - Convert managed data to native data.
__ppenum_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::SharedTypes.ComInterfaces.IEnumUnknown>.ConvertToUnmanaged(ppenum);
__ppenum_native__out = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::SharedTypes.ComInterfaces.IEnumUnknown>.ConvertToUnmanaged(ppenum);
// AssignOut - Assign to parameters
*__ppenum_native__param = __ppenum_native__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
// CleanupFailure - Perform required cleanup.
global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::SharedTypes.ComInterfaces.IEnumUnknown>.Free(__ppenum_native__out);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ file unsafe partial interface InterfaceImplementation
internal static int ABI_Get(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, float* __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.IFloat @this = default;
ref float __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
float __invokeRetValUnmanaged__out = default;
float __invokeRetVal = default;
int __retVal = default;
try
Expand All @@ -60,11 +60,14 @@ internal static int ABI_Get(System.Runtime.InteropServices.ComWrappers.ComInterf
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IFloat>(__this_native);
__invokeRetVal = @this.Get();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = __invokeRetVal;
__invokeRetValUnmanaged__out = __invokeRetVal;
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -85,6 +88,7 @@ internal static int ABI_Set(System.Runtime.InteropServices.ComWrappers.ComInterf
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ file unsafe partial interface InterfaceImplementation
internal static int ABI_GetInt(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int* __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.IGetAndSetInt @this = default;
ref int __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
int __invokeRetValUnmanaged__out = default;
int __invokeRetVal = default;
int __retVal = default;
try
Expand All @@ -60,11 +60,14 @@ internal static int ABI_GetInt(System.Runtime.InteropServices.ComWrappers.ComInt
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IGetAndSetInt>(__this_native);
__invokeRetVal = @this.GetInt();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = __invokeRetVal;
__invokeRetValUnmanaged__out = __invokeRetVal;
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand All @@ -85,6 +88,7 @@ internal static int ABI_SetInt(System.Runtime.InteropServices.ComWrappers.ComInt
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
return __retVal;
}

return __retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
finally
{
// Cleanup - Perform required cleanup.
__retVal_native__numElements = 10;
global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.Free(__retVal_native);
}

Expand All @@ -52,7 +51,7 @@ file unsafe partial interface InterfaceImplementation
internal static int ABI_GetInts(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int** __invokeRetValUnmanaged__param)
{
global::SharedTypes.ComInterfaces.IGetIntArray @this = default;
ref int* __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param;
int* __invokeRetValUnmanaged__out = default;
int[] __invokeRetVal = default;
int __retVal = default;
// Setup - Perform required setup.
Expand All @@ -65,12 +64,17 @@ internal static int ABI_GetInts(System.Runtime.InteropServices.ComWrappers.ComIn
@this = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::SharedTypes.ComInterfaces.IGetIntArray>(__this_native);
__invokeRetVal = @this.GetInts();
// Marshal - Convert managed data to native data.
__invokeRetValUnmanaged = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.AllocateContainerForUnmanagedElements(__invokeRetVal, out __invokeRetValUnmanaged__numElements);
global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetManagedValuesSource(__invokeRetVal).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetUnmanagedValuesDestination(__invokeRetValUnmanaged, __invokeRetValUnmanaged__numElements));
__invokeRetValUnmanaged__out = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.AllocateContainerForUnmanagedElements(__invokeRetVal, out __invokeRetValUnmanaged__numElements);
global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetManagedValuesSource(__invokeRetVal).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetUnmanagedValuesDestination(__invokeRetValUnmanaged__out, __invokeRetValUnmanaged__numElements));
// AssignOut - Assign to parameters
*__invokeRetValUnmanaged__param = __invokeRetValUnmanaged__out;
}
catch (System.Exception __exception)
{
__retVal = System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
// CleanupFailure - Perform required cleanup.
global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.Free(__invokeRetValUnmanaged__out);
return __retVal;
}

return __retVal;
Expand Down
Loading