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