public static SafeOverlappedFree Alloc() { SafeOverlappedFree result = Interop.mincore_obsolete.LocalAlloc(LPTR, (UIntPtr)Win32.OverlappedSize); if (result.IsInvalid) { result.SetHandleAsInvalid(); throw new OutOfMemoryException(); } return(result); }
public static SafeOverlappedFree Alloc() { SafeOverlappedFree result = Interop.Kernel32.LocalAlloc_SafeOverlappedFree( Interop.Kernel32.LPTR, (UIntPtr)Interop.Kernel32.OverlappedSize); if (result.IsInvalid) { result.SetHandleAsInvalid(); throw new OutOfMemoryException(); } return(result); }