public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
        {
            for (int i = 0; i < prgCmds.Length; i++)
            {
                // These command IDs don't ever get passed in to
                // QueryStatus, as far as I can see, but better safe than sorry.
                if (prgCmds[i].cmdID == OLECMDID.SHOWSCRIPTERROR || prgCmds[i].cmdID == OLECMDID.SHOWMESSAGE)
                    prgCmds[i].cmdf = OLECMDF.SUPPORTED;
            }

            return HRESULT.S_OK;
        }
 public void QueryStatus(Guid pguidCmdGroup, uint cCmds, ref OLECMD prgCmds, IntPtr pCmdText)
 {
     throw new COMException("QueryStatus not Implemented", HRESULT.E_NOTIMPL);
 }