public static IntPtr DoString(String expression, String inAction = "DoString")
    {
        if (CreateScope() == (IntPtr)0)
        {
            return((IntPtr)0);
        }

        try
        {
            // 文字列からソース生成
            engine.Evaluate(expression);
            return((IntPtr)1);
        }
        catch (ScriptEngineException e)
        {
            OutputDebugStream("in " + inAction);
            OutputDebugStream(e.GetType().Name + ":");
            OutputDebugStream(e.ErrorDetails);

            var stack = engine.GetStackTrace();
            OutputDebugStream(stack.ToString());

            ScriptEngineException next = e.InnerException as ScriptEngineException;
            while (next != null)
            {
                OutputDebugStream(next.ErrorDetails);
                next = next.InnerException as ScriptEngineException;
            }
        }
        catch (ScriptInterruptedException e)
        {
            OutputDebugStream("in " + inAction);
            OutputDebugStream(e.GetType().Name + ":");
            OutputDebugStream(e.ErrorDetails);

            var stack = engine.GetStackTrace();
            OutputDebugStream(stack.ToString());

            ScriptInterruptedException next = e.InnerException as ScriptInterruptedException;
            while (next != null)
            {
                OutputDebugStream(next.ErrorDetails);
                next = next.InnerException as ScriptInterruptedException;
            }
        }
        catch (Exception e)
        {
            OutputDebugStream("in " + inAction);
            OutputDebugStream(e.GetType().Name + ":");
            OutputDebugStream(e.Message);
        }

        return((IntPtr)0);
    }