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

◆ ReAllocHGlobal()

static IntPtr System.Runtime.InteropServices.Marshal.ReAllocHGlobal ( IntPtr pv,
IntPtr cb )
inlinestatic

Definition at line 1688 of file Marshal.cs.

1689 {
1690 if (pv == IntPtr.Zero)
1691 {
1692 return AllocHGlobal(cb);
1693 }
1694 IntPtr intPtr = Interop.Kernel32.LocalReAlloc(pv, (nuint)(nint)cb, 2u);
1695 if (intPtr == IntPtr.Zero)
1696 {
1697 throw new OutOfMemoryException();
1698 }
1699 return intPtr;
1700 }
static IntPtr LocalReAlloc(IntPtr hMem, nuint uBytes, uint uFlags)
static IntPtr AllocHGlobal(int cb)
Definition Marshal.cs:625

References System.Runtime.InteropServices.Marshal.AllocHGlobal(), Interop.Kernel32.LocalReAlloc(), and System.IntPtr.Zero.