using System ;
using System.Collections.Generic ;
using System.Runtime.InteropServices ;
using System.Text ;


namespace DxLibDLL
{


	public static partial class DX
	{


		/// <summary> ３Ｄと２Ｄの共存率を上げるフラグのセット </summary>
		public static void Set2D3DKyouzonFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_Set2D3DKyouzonFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_Set2D3DKyouzonFlag( bool Flag ) ;


		/// <summary> ３Ｄ機能を使わないフラグのセット </summary>
		public static void SetNotUse3DFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetNotUse3DFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetNotUse3DFlag( bool Flag ) ;


		/// <summary> 簡略化ブレンド処理を行うか否かのフラグをセットする </summary>
		public static void SetBasicBlendFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetBasicBlendFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetBasicBlendFlag( bool Flag ) ;


		/// <summary> 画面データをＶＲＡＭに置くか、フラグ </summary>
		public static void SetScreenMemToVramFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetScreenMemToVramFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetScreenMemToVramFlag( bool Flag ) ;


		/// <summary> ソフトウエアレンダリングモードを使用するかどうかをセットする </summary>
		public static void SetUseSoftwareRenderModeFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetUseSoftwareRenderModeFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetUseSoftwareRenderModeFlag( bool Flag ) ;


		/// <summary> ＤｉｒｅｃｔＤｒａｗを使用するかどうかをセットする </summary>
		public static void SetUseDirectDrawFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetUseDirectDrawFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetUseDirectDrawFlag( bool Flag ) ;


		/// <summary> ＧＤＩ描画を必要とするか、を変更する </summary>
		public static void SetUseGDIFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetUseGDIFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetUseGDIFlag( bool Flag ) ;


		/// <summary> ＤｉｒｅｃｔＤｒａｗが使用するＧＵＩＤを設定する </summary>
		public static void SetDDrawUseGuid( Guid Guid )
		{
			lock( locker )
			{
				GUID Guid_ = new GUID() ;
				Guid_.Data = Guid.ToByteArray() ;
				int result = dx_SetDDrawUseGuid( ref Guid_ ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetDDrawUseGuid( [ In ] ref GUID Guid ) ;


		/// <summary> フルスクリーン時の画面のリフレッシュレートを変更する(Windows2000以降のみ有効) </summary>
		public static void SetDisplayRefreshRate( int RefreshRate )
		{
			lock( locker )
			{
				int result = dx_SetDisplayRefreshRate( RefreshRate ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetDisplayRefreshRate( int RefreshRate ) ;


		/// <summary> DirectDraw や Direct3D の協調レベルをマルチスレッド対応にするかどうかをセットする </summary>
		public static void SetMultiThreadFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetMultiThreadFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetMultiThreadFlag( bool Flag ) ;


		/// <summary> 使用する DirectDraw デバイスのインデックスを設定する </summary>
		public static void SetUseDirectDrawDeviceIndex( int Index )
		{
			lock( locker )
			{
				int result = dx_SetUseDirectDrawDeviceIndex( Index ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetUseDirectDrawDeviceIndex( int Index ) ;


		/// <summary> 一時退避用表画面を使用するかどうかを設定する( TRUE:使用する  FALSE:使用しない ) </summary>
		public static void SetUseTempFrontScreen( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetUseTempFrontScreen( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetUseTempFrontScreen( bool Flag ) ;


		/// <summary> 描画サイズを取得する </summary>
		public static void GetDrawScreenSize( out int XBuf , out int YBuf )
		{
			lock( locker )
			{
				int result = dx_GetDrawScreenSize( out XBuf , out YBuf ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetDrawScreenSize( out int XBuf , out int YBuf ) ;


		/// <summary> 使用色ビット数を返す </summary>
		public static int GetScreenBitDepth()
		{
			lock( locker )
			{
				int result = dx_GetScreenBitDepth() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetScreenBitDepth() ;


		/// <summary> 指定のインデックスのビットマップデータが３Ｄデバイスによる描画が可能かどうかを取得する( TRUE:出来る  FALSE:出来ない ) </summary>
		public static bool GetBmpSurf3DRenderingValidState( int BmpIndex )
		{
			lock( locker )
			{
				int result = dx_GetBmpSurf3DRenderingValidState( BmpIndex ) ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetBmpSurf3DRenderingValidState( int BmpIndex ) ;


		/// <summary> 描画対象となっているサーフェスを取得 </summary>
		/// <returns> 戻り値を IDirectDrawSurface7 * にキャストして下さい </returns>
		public static IntPtr GetDrawTargetSurface()
		{
			lock( locker )
			{
				IntPtr result = dx_GetDrawTargetSurface() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetDrawTargetSurface() ;


		/// <summary> プライマリサーフェスを取得 </summary>
		/// <returns> 戻り値を IDirectDrawSurface7 * にキャストして下さい </returns>
		public static IntPtr GetPrimarySurface()
		{
			lock( locker )
			{
				IntPtr result = dx_GetPrimarySurface() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetPrimarySurface() ;


		/// <summary> バックサーフェスを取得 </summary>
		/// <returns> 戻り値を IDirectDrawSurface7 * にキャストして下さい </returns>
		public static IntPtr GetBackSurface()
		{
			lock( locker )
			{
				IntPtr result = dx_GetBackSurface() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetBackSurface() ;


		/// <summary> 作業用サーフェスを取得 </summary>
		/// <returns> 戻り値を IDirectDrawSurface7 * にキャストして下さい </returns>
		public static IntPtr GetWorkSurface()
		{
			lock( locker )
			{
				IntPtr result = dx_GetWorkSurface() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetWorkSurface() ;


		/// <summary> デスクトップ画面への描画かの判定情報 </summary>
		public static bool GetDesktopDrawCmp()
		{
			lock( locker )
			{
				int result = dx_GetDesktopDrawCmp() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetDesktopDrawCmp() ;


		/// <summary> 現在使用しているＤｉｒｅｃｔＤｒａｗオブジェクトのアドレスを取得する </summary>
		/// <returns> 戻り値を IDirectDrawSurface7 * にキャストして下さい </returns>
		public static IntPtr GetUseDDrawObj()
		{
			lock( locker )
			{
				IntPtr result = dx_GetUseDDrawObj() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetUseDDrawObj() ;


		/// <summary> ＤｉｒｅｃｔＤｒａｗを使用するかどうかを取得する </summary>
		public static bool GetUseDirectDrawFlag()
		{
			lock( locker )
			{
				int result = dx_GetUseDirectDrawFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetUseDirectDrawFlag() ;


		/// <summary> 画面の色ビット深度を得る </summary>
		public static int GetColorBitDepth()
		{
			lock( locker )
			{
				int result = dx_GetColorBitDepth() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetColorBitDepth() ;


		/// <summary> 画面モードが変更されているかどうかのフラグを取得する </summary>
		public static bool GetChangeDisplayFlag()
		{
			lock( locker )
			{
				int result = dx_GetChangeDisplayFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetChangeDisplayFlag() ;


		/// <summary> ディスプレイのカラーデータポインタを得る </summary>
		public static COLORDATA GetDispColorData()
		{
			lock( locker )
			{
				IntPtr result = dx_GetDispColorData() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return ( COLORDATA )( Marshal.PtrToStructure( result , typeof( COLORDATA ) ) ) ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetDispColorData() ;


		/// <summary> 画面グラフィックデータがシステムメモリに存在するかフラグの取得 </summary>
		public static bool GetScreenMemToSystemMemFlag()
		{
			lock( locker )
			{
				int result = dx_GetScreenMemToSystemMemFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetScreenMemToSystemMemFlag() ;


		/// <summary> ビデオメモリの容量を得る </summary>
		public static void GetVideoMemorySize( out int AllSize , out int FreeSize )
		{
			lock( locker )
			{
				int result = dx_GetVideoMemorySize( out AllSize , out FreeSize ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetVideoMemorySize( out int AllSize , out int FreeSize ) ;


		/// <summary> ＧＤＩ描画を必要とするかどうかを取得する </summary>
		public static bool GetUseGDIFlag()
		{
			lock( locker )
			{
				int result = dx_GetUseGDIFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetUseGDIFlag() ;


		/// <summary> NotDraw3DFlag を取得する </summary>
		public static bool GetNotDraw3DFlag()
		{
			lock( locker )
			{
				int result = dx_GetNotDraw3DFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetNotDraw3DFlag() ;


		/// <summary> 描画先になっている画面のＤＣを取得する </summary>
		/// <returns> HDC </returns>
		public static IntPtr GetDrawScreenDC()
		{
			lock( locker )
			{
				IntPtr result = dx_GetDrawScreenDC() ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetDrawScreenDC() ;


		/// <summary> GetScreenDC で取得したＤＣを解放する </summary>
		/// <param name="Dc"> HDC </param>
		public static void ReleaseDrawScreenDC( IntPtr Dc )
		{
			lock( locker )
			{
				int result = dx_ReleaseDrawScreenDC( Dc ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_ReleaseDrawScreenDC( IntPtr Dc ) ;


		/// <summary> 有効な DirectDraw デバイスの GUID を取得する </summary>
		public static Guid GetDirectDrawDeviceGUID( int Number )
		{
			lock( locker )
			{
				IntPtr result = dx_GetDirectDrawDeviceGUID( Number ) ;
				if( !( result != IntPtr.Zero ) ) { throw new DX.Exception(); }
				return new Guid( ( ( GUID )( Marshal.PtrToStructure( result , typeof( GUID ) ) ) ).Data ) ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern IntPtr dx_GetDirectDrawDeviceGUID( int Number ) ;


		/// <summary> 有効な DirectDraw デバイスの名前を得る </summary>
		public static void GetDirectDrawDeviceDescription( int Number , out string StringBuffer )
		{
			lock( locker )
			{
				StringBuilder stringBuffer = new StringBuilder( 0x200 ) ;
				int result = dx_GetDirectDrawDeviceDescription( Number , stringBuffer ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
				StringBuffer = stringBuffer.ToString() ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetDirectDrawDeviceDescription( int Number , [ Out ] StringBuilder StringBuffer ) ;


		/// <summary> 有効な DirectDraw デバイスの数を取得する </summary>
		public static int GetDirectDrawDeviceNum()
		{
			lock( locker )
			{
				int result = dx_GetDirectDrawDeviceNum() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetDirectDrawDeviceNum() ;


		/// <summary> MEMIMG 構造体を使用するかどうかを取得する </summary>
		public static bool GetUseMEMIMGFlag()
		{
			lock( locker )
			{
				int result = dx_GetUseMEMIMGFlag() ;
				if( result == 0 ) { return false ; }
				else if( result == 1 ) { return true ; }
				else { throw new DX.Exception() ; }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetUseMEMIMGFlag() ;


		/// <summary> 垂直同期信号一回に付きかかる時間をミリ秒単位で取得する </summary>
		public static int GetVSyncTime()
		{
			lock( locker )
			{
				int result = dx_GetVSyncTime() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetVSyncTime() ;


		/// <summary> 現在の画面のリフレッシュレートを取得する </summary>
		public static int GetRefreshRate()
		{
			lock( locker )
			{
				int result = dx_GetRefreshRate() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetRefreshRate() ;


		/// <summary> 変更可能なディスプレイモードの数を取得する </summary>
		public static int GetDisplayModeNum()
		{
			lock( locker )
			{
				int result = dx_GetDisplayModeNum() ;
				if( !( result >= 0 ) ) { throw new DX.Exception(); }
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetDisplayModeNum() ;


		/// <summary> 変更可能なディスプレイモードの情報を取得する( ModeIndex は 0 〜 GetDisplayModeNum の戻り値-1 ) </summary>
		public static DISPLAYMODEDATA GetDisplayMode( int ModeIndex )
		{
			lock( locker )
			{
				DISPLAYMODEDATA result = dx_GetDisplayMode( ModeIndex ) ;
				return result ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern DISPLAYMODEDATA dx_GetDisplayMode( int ModeIndex ) ;


		/// <summary> パレットのセット </summary>
		public static void SetPalette( int PalIndex , int Red , int Green , int Blue )
		{
			lock( locker )
			{
				int result = dx_SetPalette( PalIndex , Red , Green , Blue ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetPalette( int PalIndex , int Red , int Green , int Blue ) ;


		/// <summary> セットしたパレットをハードウエアに反映させる </summary>
		public static void ReflectionPalette()
		{
			lock( locker )
			{
				int result = dx_ReflectionPalette() ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_ReflectionPalette() ;


		/// <summary> パレットの取得 </summary>
		public static void GetPalette( int PalIndex , out int Red , out int Green , out int Blue )
		{
			lock( locker )
			{
				int result = dx_GetPalette( PalIndex , out Red , out Green , out Blue ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetPalette( int PalIndex , out int Red , out int Green , out int Blue ) ;


		/// <summary> ＢＭＰファイルのパレットを反映させる </summary>
		public static void SetBmpPal( string FileName )
		{
			lock( locker )
			{
				int result = dx_SetBmpPal( FileName ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetBmpPal( string FileName ) ;


		/// <summary> ＢＭＰファイルからのパレットの部分取得 </summary>
		public static void SetBmpPalPart( string FileName , int StartNum , int GetNum , int SetNum )
		{
			lock( locker )
			{
				int result = dx_SetBmpPalPart( FileName , StartNum , GetNum , SetNum ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetBmpPalPart( string FileName , int StartNum , int GetNum , int SetNum ) ;


		/// <summary> メモリ上に読み込んだ画像のパレットを取得する(フルカラー画像の場合は無効) </summary>
		public static void GetGraphPalette( Graph GrHandle , int ColorIndex , out int Red , out int Green , out int Blue )
		{
			lock( locker )
			{
				int result = dx_GetGraphPalette( Graph.ToHandle( GrHandle ) , ColorIndex , out Red , out Green , out Blue ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetGraphPalette( int GrHandle , int ColorIndex , out int Red , out int Green , out int Blue ) ;


		/// <summary> メモリ上に読み込んだ画像の SetGraphPalette で変更する前のパレットを取得する </summary>
		public static void GetGraphOriginalPalette( Graph GrHandle , int ColorIndex , out int Red , out int Green , out int Blue )
		{
			lock( locker )
			{
				int result = dx_GetGraphOriginalPalette( Graph.ToHandle( GrHandle ) , ColorIndex , out Red , out Green , out Blue ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetGraphOriginalPalette( int GrHandle , int ColorIndex , out int Red , out int Green , out int Blue ) ;


		/// <summary> メモリ上に読み込んだ画像のパレットを変更する(フルカラー画像の場合は無効) </summary>
		public static void SetGraphPalette( Graph GrHandle , int ColorIndex , COLOR_U8 Color )
		{
			lock( locker )
			{
				int result = dx_SetGraphPalette( Graph.ToHandle( GrHandle ) , ColorIndex , Color ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetGraphPalette( int GrHandle , int ColorIndex , COLOR_U8 Color ) ;


		/// <summary> SetGraphPalette で変更したパレットを全て元に戻す </summary>
		public static void ResetGraphPalette( Graph GrHandle )
		{
			lock( locker )
			{
				int result = dx_ResetGraphPalette( Graph.ToHandle( GrHandle ) ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_ResetGraphPalette( int GrHandle ) ;


		/// <summary> 指定座標の色を取得する </summary>
		public static COLOR_U8 GetPixel( int x , int y )
		{
			lock( locker )
			{
				int result = dx_GetPixel( x , y ) ;
				return new COLOR_U8( result ) ;
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GetPixel( int x , int y ) ;


		/// <summary> 指定点から境界色があるところまで塗りつぶす(境界色を -1 にすると指定点の色の領域を塗りつぶす) </summary>
		public static void Paint( int x , int y , COLOR_U8 FillColor )
		{
			int result = dx_Paint( x , y , FillColor , -1 ) ;
			if( !( result == 0 ) ) { throw new DX.Exception(); }
		}

		/// <summary> 指定点から境界色があるところまで塗りつぶす(境界色を -1 にすると指定点の色の領域を塗りつぶす) </summary>
		public static void Paint( int x , int y , COLOR_U8 FillColor , COLOR_U8 BoundaryColor )
		{
			lock( locker )
			{
				int result = dx_Paint( x , y , FillColor , BoundaryColor.ToInt() ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_Paint( int x , int y , COLOR_U8 FillColor , int BoundaryColor ) ;


		/// <summary> 指定のサーフェスから指定のサーフェスへグラフィックデータを転送する </summary>
		/// <param name="Dest"> D_IDirectDrawSurface7 * </param>
		/// <param name="Src"> D_IDirectDrawSurface7 * </param>
		public static void BltFastOrBitBlt( IntPtr Dest , IntPtr Src , int DestX , int DestY , RECT SrcRect )
		{
			int result = dx_BltFastOrBitBlt( Dest , Src , DestX , DestY , ref SrcRect , -1 ) ;
			if( !( result == 0 ) ) { throw new DX.Exception(); }
		}

		/// <summary> 指定のサーフェスから指定のサーフェスへグラフィックデータを転送する </summary>
		/// <param name="Dest"> D_IDirectDrawSurface7 * </param>
		/// <param name="Src"> D_IDirectDrawSurface7 * </param>
		public static void BltFastOrBitBlt( IntPtr Dest , IntPtr Src , int DestX , int DestY , RECT SrcRect , bool BltType )
		{
			lock( locker )
			{
				int result = dx_BltFastOrBitBlt( Dest , Src , DestX , DestY , ref SrcRect , BltType ? 1 : 0 ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_BltFastOrBitBlt( IntPtr Dest , IntPtr Src , int DestX , int DestY , [ In ] ref RECT SrcRect , int BltType ) ;


		/// <summary> 垂直同期信号を待つ </summary>
		public static void WaitVSync( int SyncNum )
		{
			lock( locker )
			{
				int result = dx_WaitVSync( SyncNum ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_WaitVSync( int SyncNum ) ;


		/// <summary> 裏画面と表画面を交換する </summary>
		public static void ScreenFlip()
		{
			lock( locker )
			{
				int result = dx_ScreenFlip() ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_ScreenFlip() ;


		/// <summary> 裏画面の内容を表画面に描画する </summary>
		public static void ScreenCopy()
		{
			lock( locker )
			{
				int result = dx_ScreenCopy() ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_ScreenCopy() ;


		/// <summary> 画像の内容をコピーする </summary>
		public static void GraphCopy( RECT SrcRect , RECT DestRect , Graph SrcHandle , Graph DestHandle )
		{
			lock( locker )
			{
				int result = dx_GraphCopy( ref SrcRect , ref DestRect , Graph.ToHandle( SrcHandle ) , Graph.ToHandle( DestHandle ) ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_GraphCopy( [ In ] ref RECT SrcRect , [ In ] ref RECT DestRect , int SrcHandle , int DestHandle ) ;


		/// <summary> 画面モードを設定する </summary>
		public static void SetGraphMode( int ScreenSizeX , int ScreenSizeY , int ColorBitDepth )
		{
			SetGraphMode( ScreenSizeX , ScreenSizeY , ColorBitDepth , 60 ) ;
		}

		/// <summary> 画面モードを設定する </summary>
		public static void SetGraphMode( int ScreenSizeX , int ScreenSizeY , int ColorBitDepth , int RefreshRate )
		{
			lock( locker )
			{
				int result = dx_SetGraphMode( ScreenSizeX , ScreenSizeY , ColorBitDepth , RefreshRate ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetGraphMode( int ScreenSizeX , int ScreenSizeY , int ColorBitDepth , int RefreshRate ) ;


		/// <summary> ScreenFlip 時に表画面全体に転送する裏画面の領域を設定する( DxLib_Init の前でのみ使用可能 ) </summary>
		public static void SetGraphDisplayArea( int x1 , int y1 , int x2 , int y2 )
		{
			lock( locker )
			{
				int result = dx_SetGraphDisplayArea( x1 , y1 , x2 , y2 ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetGraphDisplayArea( int x1 , int y1 , int x2 , int y2 ) ;


		/// <summary> 画面モード変更時( とウインドウモード変更時 )にグラフィックスシステムの設定やグラフィックハンドルをリセットするかどうかを設定する( TRUE:リセットする  FALSE:リセットしない ) </summary>
		public static void SetChangeScreenModeGraphicsSystemResetFlag( bool Flag )
		{
			lock( locker )
			{
				int result = dx_SetChangeScreenModeGraphicsSystemResetFlag( Flag ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SetChangeScreenModeGraphicsSystemResetFlag( bool Flag ) ;


		/// <summary> 現在描画対象になっている画面を保存する </summary>
		public static void SaveDrawScreen( int x1 , int y1 , int x2 , int y2 , string FileName )
		{
			SaveDrawScreen( x1 , y1 , x2 , y2 , FileName , DX_IMAGESAVETYPE.BMP ) ;
		}

		/// <summary> 現在描画対象になっている画面を保存する </summary>
		public static void SaveDrawScreen( int x1 , int y1 , int x2 , int y2 , string FileName , DX_IMAGESAVETYPE SaveType )
		{
			SaveDrawScreen( x1 , y1 , x2 , y2 , FileName , SaveType , 80 , true , -1 ) ;
		}

		/// <summary> 現在描画対象になっている画面を保存する </summary>
		public static void SaveDrawScreen( int x1 , int y1 , int x2 , int y2 , string FileName , DX_IMAGESAVETYPE SaveType , int Jpeg_Quality , bool Jpeg_Sample2x1 , int Png_CompressionLevel )
		{
			lock( locker )
			{
				int result = dx_SaveDrawScreen( x1 , y1 , x2 , y2 , FileName , SaveType , Jpeg_Quality , Jpeg_Sample2x1 , Png_CompressionLevel ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SaveDrawScreen( int x1 , int y1 , int x2 , int y2 , string FileName , DX_IMAGESAVETYPE SaveType , int Jpeg_Quality , bool Jpeg_Sample2x1 , int Png_CompressionLevel ) ;


		/// <summary> 現在描画対象になっている画面をＢＭＰ形式で保存する </summary>
		public static void SaveDrawScreenToBMP( int x1 , int y1 , int x2 , int y2 , string FileName )
		{
			lock( locker )
			{
				int result = dx_SaveDrawScreenToBMP( x1 , y1 , x2 , y2 , FileName ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SaveDrawScreenToBMP( int x1 , int y1 , int x2 , int y2 , string FileName ) ;


		/// <summary> 現在描画対象になっている画面をＪＰＥＧ形式で保存する Quality = 画質、値が大きいほど低圧縮高画質 ,0〜100  </summary>
		public static void SaveDrawScreenToJPEG( int x1 , int y1 , int x2 , int y2 , string FileName )
		{
			SaveDrawScreenToJPEG( x1 , y1 , x2 , y2 , FileName , 80 ) ;
		}

		/// <summary> 現在描画対象になっている画面をＪＰＥＧ形式で保存する Quality = 画質、値が大きいほど低圧縮高画質 ,0〜100  </summary>
		public static void SaveDrawScreenToJPEG( int x1 , int y1 , int x2 , int y2 , string FileName , int Quality )
		{
			SaveDrawScreenToJPEG( x1 , y1 , x2 , y2 , FileName , Quality , true ) ;
		}

		/// <summary> 現在描画対象になっている画面をＪＰＥＧ形式で保存する Quality = 画質、値が大きいほど低圧縮高画質 ,0〜100  </summary>
		public static void SaveDrawScreenToJPEG( int x1 , int y1 , int x2 , int y2 , string FileName , int Quality , bool Sample2x1 )
		{
			lock( locker )
			{
				int result = dx_SaveDrawScreenToJPEG( x1 , y1 , x2 , y2 , FileName , Quality , Sample2x1 ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SaveDrawScreenToJPEG( int x1 , int y1 , int x2 , int y2 , string FileName , int Quality , bool Sample2x1 ) ;


		/// <summary> 現在描画対象になっている画面をＰＮＧ形式で保存する CompressionLevel = 圧縮率、値が大きいほど高圧縮率高負荷、０は無圧縮 ,0〜9 </summary>
		public static void SaveDrawScreenToPNG( int x1 , int y1 , int x2 , int y2 , string FileName )
		{
			SaveDrawScreenToPNG( x1 , y1 , x2 , y2 , FileName , -1 ) ;
		}

		/// <summary> 現在描画対象になっている画面をＰＮＧ形式で保存する CompressionLevel = 圧縮率、値が大きいほど高圧縮率高負荷、０は無圧縮 ,0〜9 </summary>
		public static void SaveDrawScreenToPNG( int x1 , int y1 , int x2 , int y2 , string FileName , int CompressionLevel )
		{
			lock( locker )
			{
				int result = dx_SaveDrawScreenToPNG( x1 , y1 , x2 , y2 , FileName , CompressionLevel ) ;
				if( !( result == 0 ) ) { throw new DX.Exception(); }
			}
		}

	#if UNICODE
		[ DllImport( "DxLibW.dll" , CharSet = CharSet.Unicode , ExactSpelling = true ) ]
	#else
		[ DllImport( "DxLib.dll" , CharSet = CharSet.Ansi , ExactSpelling = true ) ]
	#endif
		private static extern int dx_SaveDrawScreenToPNG( int x1 , int y1 , int x2 , int y2 , string FileName , int CompressionLevel ) ;
	}
}
