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

◆ ConvertLayoutToNative()

unsafe IntPtr System.StubHelpers.AsAnyMarshaler.ConvertLayoutToNative ( object pManagedHome,
int dwFlags )
inlineprivate

Definition at line 207 of file AsAnyMarshaler.cs.

208 {
209 int cb = Marshal.SizeOfHelper(pManagedHome.GetType(), throwIfNotMarshalable: false);
210 IntPtr intPtr = Marshal.AllocCoTaskMem(cb);
211 if (IsIn(dwFlags))
212 {
213 StubHelpers.FmtClassUpdateNativeInternal(pManagedHome, (byte*)(void*)intPtr, ref cleanupWorkList);
214 }
215 if (IsOut(dwFlags))
216 {
217 backPropAction = BackPropAction.Layout;
218 }
219 layoutType = pManagedHome.GetType();
220 return intPtr;
221 }
static IntPtr AllocCoTaskMem(int cb)
Definition Marshal.cs:1702
static int SizeOfHelper(Type t, bool throwIfNotMarshalable)
static bool IsIn(int dwFlags)
static bool IsOut(int dwFlags)
CleanupWorkListElement cleanupWorkList

References System.Runtime.InteropServices.Marshal.AllocCoTaskMem(), System.StubHelpers.AsAnyMarshaler.backPropAction, System.StubHelpers.AsAnyMarshaler.cleanupWorkList, System.StubHelpers.StubHelpers.FmtClassUpdateNativeInternal(), System.StubHelpers.AsAnyMarshaler.IsIn(), System.StubHelpers.AsAnyMarshaler.IsOut(), System.StubHelpers.AsAnyMarshaler.layoutType, and System.Runtime.InteropServices.Marshal.SizeOfHelper().

Referenced by System.StubHelpers.AsAnyMarshaler.ConvertToNative().