コード例 #1
0
            } // end UpdateCmdlet()

            public int StartInput(uint BufferSize)
            {
                try
                {
                    // TODO: powershell-ize
                    Console.Write("StartInput( {0} )> ", BufferSize);
                    string input = Console.ReadLine();
                    // TODO: should this be in the debugger class?
                    IDebugControl6 dc6     = (IDebugControl6)m_cmdlet.Debugger.DebuggerInterface;
                    int            hresult = dc6.ReturnInputWide(input);
                    // TODO: apparently it can return S_FALSE, meaning it "already
                    // received the input", because it asks all clients for input. How
                    // should I inform the user?
                    if (hresult < 0)
                    {
                        Util.FailFast("ReturnInput failed", new Win32Exception(hresult));
                    }
                }
                catch (Exception e)
                {
                    Util.FailFast("Unexpected exception in StartInput callback.", e);
                }
                return(0);
            }