public static extern NativeMethods.RegionCombinationResult CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, [MarshalAs(UnmanagedType.I4)] NativeMethods.RegionCombinations fnCombineMode);
public static NativeMethods.RegionCombinationResult CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, NativeMethods.RegionCombinations fnCombineMode) { var result = UnsafeNativeMethods.CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2, fnCombineMode); ThrowLastError(result == NativeMethods.RegionCombinationResult.ERROR); return(result); }