⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmc.idl

📁 vc6.0完整版
💻 IDL
📖 第 1 页 / 共 4 页
字号:
        HRESULT Destroy([in] long cookie);

        [helpstring("Returns a data object which may be used to retrieve the context information for the specified cookie")]
        HRESULT QueryDataObject([in] long cookie, [in] DATA_OBJECT_TYPES type,
                                [out] LPDATAOBJECT* ppDataObject);
                        
        [helpstring("Returns the result view type for the specified cookie")]
        HRESULT GetResultViewType([in] long cookie, [out] LPOLESTR* ppViewType, 
                                  [out] long* pViewOptions);

        [helpstring("Get display info for the result item")]
        HRESULT GetDisplayInfo([in,out] RESULTDATAITEM*  pResultDataItem);

        [helpstring("The snap-in's compare function for two data objects")]
        HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB);
    };


    [
        object,
        uuid(E8315A52-7A1A-11D0-A2D2-00C04FD909DD),
        helpstring("Compare interface for sorting result items"),
        pointer_default(unique)
    ]
    interface IResultDataCompare : IUnknown
    {
        [helpstring("Compare two cookies")]
        HRESULT Compare([in] long lUserParam, 
            [in] long cookieA, [in] long cookieB, [in, out] int* pnResult);
    }


    [
        object,
        uuid(9CB396D8-EA83-11d0-AEF1-00C04FB6DD2C),
        helpstring("Interface for owner data result pane list"),
        pointer_default(unique)
    ]
    interface IResultOwnerData : IUnknown
    {
        [helpstring("Find result item that matches string")]
        HRESULT FindItem([in] LPRESULTFINDINFO pFindInfo, [out] int* pnFoundIndex);
        
        [helpstring("Hint to cache result item data")]
        HRESULT CacheHint ([in] int nStartIndex, [in] int nEndIndex);
        
        [helpstring("Sort result items")]
        HRESULT SortItems([in] int nColumn, [in] DWORD dwSortOptions, [in] long lUserParam); 
    }


    [
        object,
        uuid(43136EB1-D36C-11CF-ADBC-00AA00A80033),
        helpstring("IConsole Interface"),
        pointer_default(unique)
    ]
    interface IConsole : IUnknown
    {
        [helpstring("Sets IConsoles header interface")]
        HRESULT SetHeader([in] LPHEADERCTRL pHeader);

        [helpstring("Sets IConsoles toolbar interface")]
        HRESULT SetToolbar([in] LPTOOLBAR pToolbar);

        [helpstring("Queries IConsoles user provided IUnknown")]
        HRESULT QueryResultView([out] LPUNKNOWN* pUnknown);

        [helpstring("Queries the IConsole provided image list for the scope pane.")]
        HRESULT QueryScopeImageList([out] LPIMAGELIST* ppImageList);

        [helpstring("Queries the IConsole provided image list for the result pane.")]
        HRESULT QueryResultImageList([out] LPIMAGELIST* ppImageList);

        [helpstring("Generates a notification to update view(s) because of content change")]
        HRESULT UpdateAllViews([in] LPDATAOBJECT lpDataObject, 
                               [in] long data, 
                               [in] long hint);
        
        [helpstring("Displays a message box")]
        HRESULT MessageBox([in] LPCWSTR lpszText, [in] LPCWSTR lpszTitle,
                           [in] UINT fuStyle, [out] int* piRetval);

        [helpstring("Query for the IConsoleVerb.")]
        HRESULT QueryConsoleVerb([out] LPCONSOLEVERB * ppConsoleVerb);
        
        [helpstring("Selects the given scope item.")]
        HRESULT SelectScopeItem([in] HSCOPEITEM hScopeItem);
        
        [helpstring("Returns handle to the main frame window.")]
        HRESULT GetMainWindow([out] HWND* phwnd);
        
        [helpstring("Create a new window rooted at the scope item specified by hScopeItem.")]
        HRESULT NewWindow([in] HSCOPEITEM hScopeItem, [in] unsigned long lOptions);

    };



    [
        object,
        uuid(43136EB3-D36C-11CF-ADBC-00AA00A80033),
        helpstring("INodeInit Interface"),
        pointer_default(unique)
    ]
    interface IHeaderCtrl : IUnknown
    {
        const int AUTO_WIDTH = -1;  // Column width is determined by the string length + padding

        [helpstring("Add a column to a Default Result view")]
        HRESULT InsertColumn([in] int nCol, [in,] LPCWSTR title, [in] int nFormat, [in] int nWidth);

        [helpstring("Remove a column to a Default Result view")]
        HRESULT DeleteColumn([in] int nCol);

        [helpstring("Set a columns text")]
        HRESULT SetColumnText([in] int nCol, [in] LPCWSTR title);

        [helpstring("Gets a columns text")]
        HRESULT GetColumnText([in] int nCol, [out] LPOLESTR* pText);

        [helpstring("Set a columns width")]
        HRESULT SetColumnWidth([in] int nCol, [in] int nWidth);

        [helpstring("Gets a columns width")]
        HRESULT GetColumnWidth([in] int nCol, [out] int* pWidth);
    };

enum
{
///////////////////////////////////////////////////////////////////////////////
// The following bits in insertion point / submenu IDs are handled specially:
//
// CCM_INSERTIONPOINTID_MASK_SPECIAL:
//   Insertion points and submenus whose IDs contain any bit in
//   CCM_INSERTIONPOINTID_MASK_SPECIAL have special behavior.  Snap-Ins may use
//   the other bits as they see fit.
// CCM_INSERTIONPOINTID_MASK_SHARED:
//   Insertion points and submenus whose IDs contain CCM_INSERTIONPOINTID_MASK_SHARED
//   are shared between the creator of the context menu, the primary extension and
//   the third-party extension.  Any of these entities adding items to a shared
//   insertion point or submenu, add them to the same insertion point or submenu.
//   Only IContextMenuProvider may create insertion points or submenus with this bit
//   set, unless CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY is also set, in which case
//   only the primary extension may create them.
// CCM_INSERTIONPOINT_CREATE_PRIMARY:
//   Only the system may add insertion points or submenus for which CCM_INSERTIONPOINT_SHARED
//   is set and this bit is not set.  Only the primary extension may add insertion points
//   or submenus for which both bits are set.  This prevents insertion point ID conflicts
//   between insertion points and submenus created by IContextMenuProvider and those
//   created by the primary extension.
// CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY:
//   If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
//   the primary extension may not add to this insertion point or submenu.
// CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY:
//   If CCM_INSERTIONPOINT_SHARED is set and this bit is not set, then
//   the third-party extensions may not add to this insertion point or submenu.
// CCM_INSERTIONPOINTID_MASK_RESERVED:
//   Insertion points and submenus may not be added with any of these bits set.
// CCM_INSERTIONPOINTID_MASK_FLAGINDEX:
//   This mask extracts the the index field from system insertion point IDs.
//   The index gives the bit position of the associated insertion allowed flag.
   
    CCM_INSERTIONPOINTID_MASK_SPECIAL        = 0xFFFF0000,
    CCM_INSERTIONPOINTID_MASK_SHARED         = 0x80000000,
    CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY = 0x40000000,
    CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY    = 0x20000000,
    CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY   = 0x10000000,
    CCM_INSERTIONPOINTID_MASK_RESERVED       = 0x0FFF0000,
    CCM_INSERTIONPOINTID_MASK_FLAGINDEX      = 0x0000001F,

///////////////////////////////////////////////////////////////////////////////
// Use these InsertionPointIDs to add items at the predefined insertion points:
//
// 0
//   This is interpreted the same as CCM_INSERTIONPOINTID_ROOT_MENU (see below).
// CCM_INSERTIONPOINTID_PRIMARY_TOP:
//   The primary extension may use this insertion point to add items to the top of
//   the main context menu.
// CCM_INSERTIONPOINTID_PRIMARY_NEW:
//   The primary extension may use this insertion point to add items to the top of
//   the Create New submenu.
// CCM_INSERTIONPOINTID_PRIMARY_TASK:
//   The primary extension may use this insertion point to add items to the top of
//   the Task submenu.
// CCM_INSERTIONPOINTID_3RDPARTY_NEW:
//   Third-party extensions may use this insertion point to add items to the bottom of
//   the Create New submenu.
// CCM_INSERTIONPOINTID_3RDPARTY_TASK:
//   Third-party extensions may use this insertion point to add items to the bottom of
//   the Task submenu.
// CCM_INSERTIONPOINTID_ROOT_MENU:
//   IContextMenuProvider may use this insertion point to add items to the root menu.
//   Neither primary extensions nor third-party extension may add items to the root
//   menu except through insertion points added by IContextMenuProvider.
//
    CCM_INSERTIONPOINTID_PRIMARY_TOP   = 0xA0000000, // SHARED and ADD_PRIMARY
    CCM_INSERTIONPOINTID_PRIMARY_NEW   = 0xA0000001, // SHARED and ADD_PRIMARY
    CCM_INSERTIONPOINTID_PRIMARY_TASK  = 0xA0000002, // SHARED and ADD_PRIMARY
    CCM_INSERTIONPOINTID_PRIMARY_VIEW  = 0xA0000003, // SHARED and ADD_PRIMARY
    CCM_INSERTIONPOINTID_3RDPARTY_NEW  = 0x90000001, // SHARED and ADD_3RDPARTY
    CCM_INSERTIONPOINTID_3RDPARTY_TASK = 0x90000002, // SHARED and ADD_3RDPARTY
    CCM_INSERTIONPOINTID_ROOT_MENU     = 0x80000000  // SHARED
};

//
// Macro to derive an insertion allowed flag from an system insertion point ID
//
#define INSERTALLOWED_FLAG(insertionID) \
         (1L << (insertionID & CCM_INSERTIONPOINTID_MASK_FLAGINDEX)) 
enum
{
/////////////////////////////////////////////////////////////////////////////////////  
// These flags give permission to insert menu items at the CCM_INSERTIONPOINTID_xxx
// insertion points define above. The bit position of each flag is derived from the
// index portion of the corresponding insertion point ID. They are passed to the
// snap-in's AddMenuItems method.  

   CCM_INSERTIONALLOWED_TOP  = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TOP),
   CCM_INSERTIONALLOWED_NEW  = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_NEW),
   CCM_INSERTIONALLOWED_TASK = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TASK),
   CCM_INSERTIONALLOWED_VIEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_VIEW)
};


enum
{
///////////////////////////////////////////////////////////////////////////////
// The following bits in menu command IDs are handled specially:
//
// CCM_COMMANDID_MASK_RESERVED:
//   Items other than insertion points and submenus may not be added with any of
//   these bits set.
// 
    CCM_COMMANDID_MASK_RESERVED       = 0xFFFF0000
};

enum
{
///////////////////////////////////////////////////////////////////////////////
// The following flags may be passed via AddMenuItem parameter fSpecialFlags:
//
// CCM_SPECIAL_SEPARATOR
//   Ignore all other parameters except lInsertionPointID.  Add a separator to the
//   end of the menu or the specified insertion point, except that
//   CCM_SPECIAL_SEPARATOR will never add a separator as the first or last item
//   in a menu/submenu, and if two or more consecutive CCM_SPECIAL_SEPARATORs are added,
//   only one appears in the menu.  Only IContextMenuProvider is permitted to add
//   separators, either special or otherwise, to menus created by IContextMenuProvider.
//
    CCM_SPECIAL_SEPARATOR         = 0x0001,
//
// CCM_SPECIAL_SUBMENU
//   If this submenu is empty, then it will be grayed and disabled.
//   This is only valid for MF_POPUP items.
//
    CCM_SPECIAL_SUBMENU           = 0x0002,
//
// CCM_SPECIAL_DEFAULT_ITEM
//   This should be the default menu item.  If more than one menu item specifies this flag,
//   the last one in each submenu takes precedence.
//
    CCM_SPECIAL_DEFAULT_ITEM      = 0x0004,
//
// CCM_SPECIAL_INSERTION_POINT
//   Ignore all other parameters except lCommandID and lInsertionPointID.  This creates
//   a new "insertion point" at the end of the insertion point or submenu identified by
//   lInsertionPointID (0 is the end of the main menu).  Subsequent calls may use
//   the lCommandID from this call as their lInsertionPointID, and insert their own
//   menu items, submenus or insertion points at this point in this menu.
//
    CCM_SPECIAL_INSERTION_POINT   = 0x0008,
//
// CCM_SPECIAL_TESTONLY
//   Perform the normal validation of the menu item parameters and return the appropriate
//   result code, but do not actually add the menu item. 
//
    CCM_SPECIAL_TESTONLY          = 0x0010     
};


    [
        object,
        uuid(43136EB7-D36C-11CF-ADBC-00AA00A80033),
        helpstring("IContextMenuCallback Interface"),
        pointer_default(unique)
    ]
    interface IContextMenuCallback : IUnknown
    {
        // returns S_OK if the item was added
        // returns E_INVALIDARG if given a NULL pointer
        // returns E_INVALIDARG if an item already exists with this lCommandID
        // returns E_INVALIDARG if insertion point ID could not be found
        // returns E_INVALIDARG if command ID or insertion point ID is invalid
        // returns E_INVALIDARG if fFlags contains MF_OWNERDRAW or MF_BITMAP
        // returns E_INVALIDARG if an extension attempts to add an item where
        //   fFlags contains MF_SEPARATOR or fSpecialFlags contains CCM_SPECIAL_SEPARATOR
        //   except in submenus created by extensions
        // otherwise an unexpected error occurred
        [helpstring("Adds one item to context menu")]
        HRESULT AddItem([in] CONTEXTMENUITEM* pItem);
    };



    [
        object,
        uuid(43136EB6-D36C-11CF-ADBC-00AA00A80033),
        object,
        helpstring("IContextMenuProvider Interface"),
        pointer_default(unique)
    ]
    //
    // Note that this derives from IContextMenuCallback
    //
    interface IContextMenuProvider : IContextMenuCallback
    {
        // Methods
        // returns S_OK unless an unexpected error occurs
        [helpstring("Clear context menu")]
        HRESULT EmptyMenuList();

        // returns S_OK if successful
        // returns E_INVALIDARG on NULL parameter
        // passes through return code from IExtendContextMenu::AddMenuItems
        //   or from CoCreateInstance
        // otherwise an unexpected error occurred
        [helpstring("Allow the primary extension to add to bottom of context menu")]
        HRESULT AddPrimaryExtensionItems([in] LPUNKNOWN piExtension, [in] LPDATAOBJECT piDataObject);

        // returns S_OK if successful
        // returns E_INVALIDARG on NULL parameter
        // returns S_FALSE if context menu has already been extended
        // passes through return code from IExtendContextMenu::AddMenuItems
        //   or from CLSIDToString or CoCreateInstance
        // otherwise an unexpected error occurred
        [helpstring("Allow third-party extensions to add to bottom of context menu")]
        HRESULT AddThirdPartyExtensionItems([in] LPDATAOBJECT piDataObject);

        // returns S_OK unless an unexpected error occurs
        [helpstring("Display context menu")]
        HRESULT ShowContextMenu([in] HWND hwndParent, [in] long xPos, [in] long yPos, [out,retval] long* plSelected);
    };


    [
        object,
        uuid(4F3B7A4F-CFAC-11CF-B8E3-00C04FD8D5B0),
        helpstring("IExtendContextMenu Interface"),
        pointer_default(unique)
    ]
    interface IExtendContextMenu : IUnknown
    {
        [helpstring("Extension may add context menu items via callback interface")]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -