//-----------------------------------------------------------------------------
        // dbCheck
        //-----------------------------------------------------------------------------
        /// <summary>
        /// Check for physical and logical corruptions on the specified database.
        /// </summary>
        /// <param name="sDbFileName">
        /// The name of the control file of the database to be checked.
        /// </param>
        /// <param name="sDataDir">
        /// The data file directory.  See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="sRflDir">
        /// The roll-forward log file directory.  See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="sPassword">
        /// Password for opening the database.  This is only needed
        /// if the database key is currently wrapped in a password instead of the
        /// local NICI storage key.
        /// </param>
        /// <param name="eFlags">
        /// Flags that control exactly what the operation checks.
        /// Should be a logical OR of the members of <see cref="DbCheckFlags"/>
        /// </param>
        /// <param name="checkStatus">
        /// An object that implements the <see cref="DbCheckStatus"/> interface.  Methods on
        /// this object will be called to report check progress and corruptions that are found.
        /// </param>
        /// <returns>
        /// Returns a <see cref="DbInfo"/> object that contains various statistics that were
        /// gathered during the database check.
        /// </returns>
        public DbInfo dbCheck(
			string			sDbFileName,
			string			sDataDir,
			string			sRflDir,
			string			sPassword,
			DbCheckFlags	eFlags,
			DbCheckStatus	checkStatus)
        {
            RCODE							rc;
            DbCheckStatusDelegate	dbCheckStatus = null;
            DbCheckStatusCallback	fnDbCheckStatus = null;
            IntPtr						pDbInfo;

            if (checkStatus != null)
            {
                dbCheckStatus = new DbCheckStatusDelegate( checkStatus);
                fnDbCheckStatus = new DbCheckStatusCallback( dbCheckStatus.funcDbCheckStatus);
            }

            if ((rc = xflaim_DbSystem_dbCheck( m_pDbSystem, sDbFileName, sDataDir,
                sRflDir, sPassword, eFlags, fnDbCheckStatus, out pDbInfo)) != 0)
            {
                throw new XFlaimException( rc);
            }
            return( new DbInfo( pDbInfo));
        }
        private static extern RCODE xflaim_DbSystem_dbCheck(
			IntPtr						pDbSystem,
			[MarshalAs(UnmanagedType.LPStr), In]
			string						pszDbName,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 						pszDataDir,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 						pszRflDir,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 						pszPassword,
			DbCheckFlags				eFlags,
			DbCheckStatusCallback	fnDbCheckStatus,
			out IntPtr					ppDbInfo);