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;
}