public static IntPtr CreateRectRgnIndirect(RECT lprc) { IntPtr intPtr = NativeMethods._CreateRectRgnIndirect(ref lprc); if (IntPtr.Zero == intPtr) { throw new Win32Exception(); } return(intPtr); }