public static extern BOOL EndPaint( HWND hWnd, ref PAINTSTRUCT lpPaint );
public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
public static extern HDC BeginPaint( HWND hWnd, ref PAINTSTRUCT lpPaint );
public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);