/// <summary>
        /// Execute a specified command.
        /// </summary>
        /// <param name="pguidCmdGroup">Guid describing which set of command the current command(s) belong to.</param>
        /// <param name="nCmdID">Command that should be executed.</param>
        /// <param name="nCmdexecopt">Options for the command.</param>
        /// <param name="pvaIn">Pointer to input arguments.</param>
        /// <param name="pvaOut">Pointer to command output.</param>
        /// <returns>S_OK if the method succeeds or OLECMDERR_E_NOTSUPPORTED on unsupported command.</returns>
        /// <remarks>Typically, only the first 2 arguments are used (to identify which command should be run).</remarks>
        public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Exec() of: {0}", this.ToString()));

            if (pguidCmdGroup == VSConstants.GUID_VSStandardCommandSet97)
            {
                // Process standard Visual Studio Commands
                switch (nCmdID)
                {
                case (uint)VSConstants.VSStd97CmdID.Copy:
                {
                    editorControl.Copy();
                    break;
                }

                case (uint)VSConstants.VSStd97CmdID.Cut:
                {
                    editorControl.Cut();
                    break;
                }

                case (uint)VSConstants.VSStd97CmdID.Paste:
                {
                    editorControl.Paste();
                    break;
                }

                case (uint)VSConstants.VSStd97CmdID.Redo:
                {
                    editorControl.Redo();
                    break;
                }

                case (uint)VSConstants.VSStd97CmdID.Undo:
                {
                    editorControl.Undo();
                    break;
                }

                case (uint)VSConstants.VSStd97CmdID.SelectAll:
                {
                    editorControl.SelectAll();
                    break;
                }

                default:
                {
                    return((int)(Constants.OLECMDERR_E_NOTSUPPORTED));
                }
                }
            }
            else if (pguidCmdGroup == GuidList.guidEditorCmdSet)
            {
                switch (nCmdID)
                {
                // if we had commands specific to our editor, they would be processed here
                default:
                {
                    return((int)(Constants.OLECMDERR_E_NOTSUPPORTED));
                }
                }
            }
            else
            {
                return((int)Constants.OLECMDERR_E_UNKNOWNGROUP);
            }

            return(VSConstants.S_OK);
        }