Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetMarshalSizeMax()

unsafe int IMarshal. System.Runtime.InteropServices.StandardOleMarshalObject.GetMarshalSizeMax ( ref Guid riid,
IntPtr pv,
int dwDestContext,
IntPtr pvDestContext,
int mshlflags,
out int pSize )
inlineprivate

Implements System.Runtime.InteropServices.IMarshal.

Definition at line 44 of file StandardOleMarshalObject.cs.

45 {
46 IntPtr stdMarshaler = GetStdMarshaler(ref riid, dwDestContext, mshlflags);
47 try
48 {
49 IntPtr intPtr = *(IntPtr*)stdMarshaler.ToPointer();
50 IntPtr ptr = *(IntPtr*)((byte*)intPtr.ToPointer() + (nint)4 * (nint)sizeof(IntPtr));
51 GetMarshalSizeMaxDelegate getMarshalSizeMaxDelegate = (GetMarshalSizeMaxDelegate)Marshal.GetDelegateForFunctionPointer(ptr, typeof(GetMarshalSizeMaxDelegate));
52 return getMarshalSizeMaxDelegate(stdMarshaler, ref riid, pv, dwDestContext, pvDestContext, mshlflags, out pSize);
53 }
54 finally
55 {
56 Marshal.Release(stdMarshaler);
57 }
58 }
IntPtr GetStdMarshaler(ref Guid riid, int dwDestContext, int mshlflags)
delegate int GetMarshalSizeMaxDelegate(IntPtr _this, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize)

References System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(), System.Runtime.InteropServices.StandardOleMarshalObject.GetMarshalSizeMaxDelegate(), System.Runtime.InteropServices.StandardOleMarshalObject.GetStdMarshaler(), System.Runtime.InteropServices.Marshal.Release(), and System.IntPtr.ToPointer().