internal static SafeLocalAllocHandle LocalAlloc(int cb)
{
SafeLocalAllocHandle result = Interop.Kernel32.LocalAlloc(Interop.Kernel32.LMEM_FIXED, (UIntPtr)cb);
if (result.IsInvalid)
{
result.SetHandleAsInvalid();
throw new OutOfMemoryException();
}
return result;
}