private int QueryColumnCount()
        {
            int columnCount            = 0;
            DkmLanguageExpression expr = null;

            try
            {
                DkmWorkList workList         = DkmWorkList.Create(null);
                SqliteVisualizerException ex = null;
                expr = this.AddFuncEval(
                    workList,
                    $"sqlite3_column_count(*(sqlite3_stmt **){this.procMemForQuery})",
                    (r) =>
                {
                    DkmSuccessEvaluationResult suc;
                    if (!this.VerifySuccess(r, out suc))
                    {
                        ex = new SqliteVisualizerException(Resources.ErrMsg_FuncEvalFailed, r.FullName);
                        return;
                    }

                    columnCount = (int)suc.Address.Value;
                });

                workList.Execute();

                if (ex != null)
                {
                    throw ex;
                }
            }
            finally
            {
                if (expr != null)
                {
                    expr.Close();
                }
            }

            return(columnCount);
        }
        private void FinalizeQuery()
        {
            DkmLanguageExpression expr = null;

            try
            {
                SqliteVisualizerException ex = null;
                DkmWorkList workList         = DkmWorkList.Create(null);
                expr = this.AddFuncEval(
                    workList,
                    $"sqlite3_finalize(*(sqlite3_stmt **){this.procMemForQuery})",
                    (r) =>
                {
                    DkmSuccessEvaluationResult suc;
                    if (!this.VerifySuccess(r, out suc))
                    {
                        ex = new SqliteVisualizerException(Resources.ErrMsg_FuncEvalFailed, r.FullName);
                        return;
                    }
                });

                workList.Execute();

                if (ex != null)
                {
                    throw ex;
                }
            }
            finally
            {
                if (expr != null)
                {
                    expr.Close();
                }
            }
        }
        private void PrepareQuery()
        {
            DkmLanguageExpression expr = null;

            try
            {
                SqliteVisualizerException ex = null;
                DkmWorkList workList         = DkmWorkList.Create(null);
                expr = this.AddFuncEval(
                    workList,
                    $"sqlite3_prepare({sqliteInstanceName}, \"{query}\", {query.Length + 1}, (sqlite3_stmt **){this.procMemForQuery}, nullptr)",
                    (r) =>
                {
                    DkmSuccessEvaluationResult suc;
                    if (!this.VerifySuccess(r, out suc))
                    {
                        ex = new SqliteVisualizerException(Resources.ErrMsg_PrepareFailed, r.FullName);
                        return;
                    }
                });

                workList.Execute();

                if (ex != null)
                {
                    throw ex;
                }
            }
            finally
            {
                if (expr != null)
                {
                    expr.Close();
                }
            }
        }