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

📄 mmc.idl

📁 vc6.0完整版
💻 IDL
📖 第 1 页 / 共 4 页
字号:
            which can be used to accquire an IUnknow to the primary snapin.
    event = one of the MMCN_NOTIFY_TYPEs
    arg and param depend on type, see below.
    
MMCN_ACTIVATE
    Is sent when a window is being activated or deactivated.
    arg = TRUE if window is activated, false otherwise.
    param = Not used.

MMCN_ADD_IMAGES
    Sent to IComponent to add images for the result pane. The primary snapin
        should add images for both folders and leaf items. Extension snapins
        should add only folder images. 
    arg = ptr to result panes IImageList.
    param = HSCOPEITEM of selected/deselected item
    
MMCN_BTN_CLICK      
    This message is sent when a user clicks on a button.
    arg   = When sent to ExtendControlbar it is the data object of currently selected,
            when sent to IComponent/IComponentData it is 0.
    param = CmdID of the button equal to a value of the MMC_COMMANDS enum type.

MMCN_EXPAND         
    arg = TRUE => expand, FALSE => contract
    param = parents HSCOPEITEM.
    
MMCN_MINIMIZED      
    Is sent when a window is being minimized or maximized.
    arg = TRUE if minimized, false otherwise.
    
MMCN_PROPERTY_CHANGE
    lpDataObject = NULL
    lParam = user object

MMCN_REMOVE_CHILDREN
    Informs the snapin to delete all the cookies it has added below.
    arg = HSCOPEITEM of the node whose children needs to be deleted.
    param = unused.
    return = unused.
    
MMCN_RENAME       
    This gets called the first time to query for rename and a
    second time to do the rename.  For the query S_OK or S_FALSE for the
    return type.  After the rename, we will send the new name with a LPOLESTR.
    arg = 0 for query, 1 for rename action 
    param = LPOLESTR for containing new name   
    return = S_OK to allow rename and S_FALSE to disallow rename.                    

MMCN_SELECT
    If sent to IComponent::Notify:
        arg:
            BOOL bScope = (BOOL) LOWORD(arg);
            BOOL bSelect = (BOOL) HIWORD(arg);
                bScope:     TRUE if an item the scope pane is selected, 
                            FALSE if an item in the result pane is selected.
                bSelect:    TRUE if the item is selected, 
                            FALSE if it is de-selected.
        param: 
            Ignored.                
                
    If sent to IExtendControlbar::ControlbarNotify:
        arg:
            BOOL bScope = (BOOL) LOWORD(arg);
            BOOL bSelect = (BOOL) HIWORD(arg);
                bScope:     TRUE if an item the scope pane is selected, 
                            FALSE if an item in the result pane is selected.
                bSelect:    TRUE if the item is selected,
                            FALSE if it is de-selected.  
        param:
            LPDATAOBJECT pDataobject = (LPDATAOBJECT)param;
            pDataobject data object of item getting selected/de-selected.

    
MMCN_SHOW           
    arg = <>0 if selecting, 0 if deselecting
    param = HSCOPEITEM of selected/deselected item

MMCN_VIEW_CHANGE    
    This message is sent to update all views of a change.
    arg = TRUE if Scope Item, FALSE if Result Item
    param = ptr to DataObject selected

MMCN_MENU_BTNCLICK      
    This message is sent when a user clicks on a button.
    arg   = Data object of currently selected.
    param = Structure (LPMENUBUTTONDATA).

MMCN_SNAPINHELP
    This message is sent when the user requests help about the snapin.
    dataObject = NULL
    arg = 0
    param = 0

MMCN_CONTEXTHELP
    This message is sent when the user requests help about a selected item
    arg = 0
    param = 0 

MMCN_DESELECT_ALL
    This message is sent when all items of an owner-data result pane
    are deselected.
    dataObject = NULL
    arg = 0
    param = 0
    
MMCN_COLUMN_CLICK
    This message is sent when the user clicks on a result listview column header.
    dataObject = NULL
    arg = Column number
    param = Sort option flags (RSI_xxx) 
    
MMCN_DELETE:
    Sent to inform the snapin that the item needs to be deleted. As a result of
    the user hitting the 'Delete' key or delete button.
    dataobject: dataobject of the selected item(s) provided by the snap-in.
    arg, param: unused.

MMCN_CUTORMOVE:
    dataobject: NULL.
    arg: pointer to a dataobject. See multi-selection below.
    param: unused.

MMCN_QUERY_PASTE:
    dataobject: dataobject of the selected item provided by the snap-in.        
    arg: dataobject of the item(s) provided by the source snap-in that needs to be pasted.
    param: unused.
    Return S_OK if the data can be pasted, S_FALSE otherwise.

MMCN_PASTE:
    dataobject & arg: are same as for MMCN_QUERY_PASTE.
    param:
        NULL for move (as opposed to cut).
        For single item paste:
            BOOL* pPasted = (BOOL*)param; 
            Set this to TRUE here if the item was successfully pasted.
        For multi-item paste:
            LPDATAOBJECT* ppDataObj = (LPDATAOBJECT*)param;
            Use this to return a pointer to a dataobject consisting of the 
            items successfully pasted. (see MMCN_CUTORMOVE below).

MMCN_FILTER_STATE:
    This message is sent when the user turns result view filtering on or off.
    dataobject = NULL
    arg = BOOL, True if filter turned on, Flase if filter turned off
    param = unused
     
MMCN_FILTER_CHANGE:
    This message is sent when the filter value for a result view column has been changed. 
    dataobject= NULL
    arg = Filter change code (see MMC_FILTER_CHANGE_CODE enumeration)
    param = column number of changed value, if change code is MFCC_VALUE_CHANGE

MMCN_GET_FILTER_MENU:
    This message is sent to get the filter operators menu for a result view column.
    dataobject = NULL
    arg = Column number
    param = Pointer to returned menu handle (HMENU)
    
MMCN_FILTER_OPERATOR:
    This message is sent when the user selects an entry from a filter operator menu.
    dataobject = NULL
    arg = Column number
    param = Menu item ID  

MMCN_INITOCX:
    Sent to a snap-in when its custom OCX is initialized for the first time.
*/

typedef enum _MMC_NOTIFY_TYPE
{
    MMCN_ACTIVATE           = 0x8001,
    MMCN_ADD_IMAGES         = 0x8002,
    MMCN_BTN_CLICK          = 0x8003,
    MMCN_CLICK              = 0x8004,
    MMCN_COLUMN_CLICK       = 0x8005,
    MMCN_CONTEXTMENU        = 0x8006,   // NOT USED
    MMCN_CUTORMOVE          = 0x8007,
    MMCN_DBLCLICK           = 0x8008,
    MMCN_DELETE             = 0x8009,
    MMCN_DESELECT_ALL       = 0x800A,
    MMCN_EXPAND             = 0x800B,
    MMCN_HELP               = 0x800C,   // NOT USED
    MMCN_MENU_BTNCLICK      = 0x800D,
    MMCN_MINIMIZED          = 0x800E,
    MMCN_PASTE              = 0x800F,
    MMCN_PROPERTY_CHANGE    = 0x8010,
    MMCN_QUERY_PASTE        = 0x8011,
    MMCN_REFRESH            = 0x8012,
    MMCN_REMOVE_CHILDREN    = 0x8013,
    MMCN_RENAME             = 0x8014,
    MMCN_SELECT             = 0x8015,
    MMCN_SHOW               = 0x8016, 
    MMCN_VIEW_CHANGE        = 0x8017,
    MMCN_SNAPINHELP         = 0x8018,
    MMCN_CONTEXTHELP        = 0x8019,
    MMCN_INITOCX            = 0x801A,   
    MMCN_FILTER_CHANGE      = 0x801B,
    MMCN_GET_FILTER_MENU    = 0x801C,
    MMCN_FILTER_OPERATOR    = 0x801D,
    
} MMC_NOTIFY_TYPE;

typedef enum _DATA_OBJECT_TYPES
{
    CCT_SCOPE            = 0x8000, // Data object while for scope pane context
    CCT_RESULT           = 0x8001, // Data object while for result pane context
    CCT_SNAPIN_MANAGER   = 0x8002, // Data object while for snap-in manager context
    CCT_UNINITIALIZED    = 0xFFFF, // Data object has an invalid type

} DATA_OBJECT_TYPES;


//New window option(s)
 
const unsigned long MMC_NW_OPTION_NONE          = 0x0000;

// No scope pane
const unsigned long MMC_NW_OPTION_NOSCOPEPANE   = 0x0001;

// No standard toolbars
const unsigned long MMC_NW_OPTION_NOTOOLBARS    = 0x0002;

// Use short window title                                          
const unsigned long MMC_NW_OPTION_SHORTTITLE    = 0x0004;

// Snap-in provides window title
const unsigned long MMC_NW_OPTION_CUSTOMTITLE   = 0x0008;

// Do not save view to console doc file
const unsigned long MMC_NW_OPTION_NOPERSIST     = 0x0010;


///////////////////////////////////////////////////////////////////////////////
// Common Console clipboard formats
//

// Clipboard format for node type guid
const wchar_t* CCF_NODETYPE = L"CCF_NODETYPE"; 

// Clipboard format for string version of node type guid
const wchar_t* CCF_SZNODETYPE = L"CCF_SZNODETYPE";

// Clipboard format for name displayed in scope pane
const wchar_t* CCF_DISPLAY_NAME = L"CCF_DISPLAY_NAME";

// Clipboard format for the snapin's class id.
const wchar_t* CCF_SNAPIN_CLASSID = L"CCF_SNAPIN_CLASSID";

// Clipboard format for window title (for window data object)
const wchar_t* CCF_WINDOW_TITLE = L"CCF_WINDOW_TITLE";

// This is the MMC supplied Multi-select data object.
const wchar_t* CCF_MMC_MULTISELECT_DATAOBJECT = L"CCF_MMC_MULTISELECT_DATAOBJECT";

// Clipboard format for the snapins multi selected dataobjects.
// If there are N snapins whose objects are selected in the result
// pane, these N dataobjects will be passed in a GloballAlloced
// memory. The first DWORD contains the number of snapins, this will
// be followed by N ptrs to the DataObjects.
typedef struct _SMMCDataObjects
{
    DWORD           count;
    LPDATAOBJECT    lpDataObject[1];
    
} SMMCDataObjects;
const wchar_t* CCF_MULTI_SELECT_SNAPINS = L"CCF_MULTI_SELECT_SNAPINS";

// Clipboard format for the array of GUIDs which constitutes the object 
// types of all the currently selected result items put by the snapin.
typedef struct _SMMCObjectTypes
{
    DWORD   count;
    GUID    guid[1];
    
} SMMCObjectTypes;

const wchar_t* CCF_OBJECT_TYPES_IN_MULTI_SELECT = L"CCF_OBJECT_TYPES_IN_MULTI_SELECT";



///////////////////////////////////////////////////////////////////////////////
// APIs exported in mmc.lib
//
cpp_quote("STDAPI MMCPropertyChangeNotify(long lNotifyHandle, long param);")
cpp_quote("STDAPI MMCFreeNotifyHandle(long lNotifyHandle);")
cpp_quote("STDAPI MMCPropPageCallback(void* vpsp);")
cpp_quote("EXTERN_C const CLSID CLSID_NodeManager;")


///////////////////////////////////////////////////////////////////////////////
// Special dataobjects
//
cpp_quote("#define DOBJ_NULL (LPDATAOBJECT)0 ")
cpp_quote("#define DOBJ_CUSTOMOCX (LPDATAOBJECT)-1 ")
cpp_quote("#define DOBJ_CUSTOMWEB (LPDATAOBJECT)-2 ")

///////////////////////////////////////////////////////////////////////////////
// Macros
//
cpp_quote("#define IS_SPECIAL_DATAOBJECT(d) ((int)(d) >= -10 && (int)(d) <= 0)")
cpp_quote("#define IS_SPECIAL_COOKIE(c) ((c) >= -10 && (c) <= -1)")

///////////////////////////////////////////////////////////////////////////////
//  Interfaces
//
    [
        object,
        uuid(955AB28A-5218-11D0-A985-00C04FD8D565),
        helpstring("IComponentData Interface"),
        pointer_default(unique)
    ]
    interface IComponentData : IUnknown
    {
        [helpstring("Snap-in entry point. Can QI for IConsole & IConsoleNameSpace")]
        HRESULT Initialize([in] LPUNKNOWN pUnknown);

        [helpstring("Create a Componet for this ComponetData")]
        HRESULT CreateComponent([out] LPCOMPONENT* ppComponent);

        [helpstring("User actions")]
        HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event, 
                       [in] long arg, [in] long param);

        [helpstring("Release cookies associated with the children of a specific node")]
        HRESULT Destroy();

        [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("Get display info for the name space item")]
        HRESULT GetDisplayInfo([in,out] SCOPEDATAITEM* pScopeDataItem);

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

    [
        object,
        uuid(43136EB2-D36C-11CF-ADBC-00AA00A80033),
        helpstring("IComponent Interface"),
        pointer_default(unique)
    ]
    interface IComponent : IUnknown
    {
        [helpstring("Snap-in entry point")]
        HRESULT Initialize([in] LPCONSOLE lpConsole);
        
        [helpstring("User actions")]
        HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event, 
                       [in] long arg, [in] long param);
                       
        [helpstring("Release cookies associated with the children of a specific node")]

⌨️ 快捷键说明

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