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

📄 mmc.idl

📁 vc6.0完整版
💻 IDL
📖 第 1 页 / 共 4 页
字号:
import "oaidl.idl";


///////////////////////////////////////////////////////////////////////////////
/// Interfaces implement by the Common Console's Node Manager

interface IConsole;
interface IHeaderCtrl;
interface IToolbar;
interface IImageList;
interface IResultData;
interface IConsoleNameSpace;
interface IPropertySheetProvider;
interface IPropertySheetCallback;
interface IContextMenuProvider;
interface IContextMenuCallback;
interface IControlbar;
interface IConsoleVerb;
interface IMenuButton;
interface IQuickFilter;


///////////////////////////////////////////////////////////////////////////////
/// Interfaces implement by the Snap-in server

interface IComponent;
interface IComponentData;
interface IExtendPropertySheet;
interface IExtendContextMenu;
interface IExtendControlbar;
interface IResultDataCompare;
interface ISnapinAbout;
interface IResultOwnerData;

///////////////////////////////////////////////////////////////////////////////
/// Type definitions

typedef IConsole*                   LPCONSOLE;
typedef IHeaderCtrl*                LPHEADERCTRL;
typedef IToolbar*                   LPTOOLBAR;
typedef IImageList*                 LPIMAGELIST;
typedef IResultData*                LPRESULTDATA;
typedef IConsoleNameSpace*          LPCONSOLENAMESPACE;
typedef IPropertySheetProvider*     LPPROPERTYSHEETPROVIDER;
typedef IPropertySheetCallback*     LPPROPERTYSHEETCALLBACK;
typedef IContextMenuProvider*       LPCONTEXTMENUPROVIDER;
typedef IContextMenuCallback*       LPCONTEXTMENUCALLBACK;
typedef IControlbar*                LPCONTROLBAR;
typedef IConsoleVerb*               LPCONSOLEVERB;
typedef IMenuButton*                LPMENUBUTTON;
typedef IQuickFilter*               LPQUICKFILTER;

typedef IComponent*                 LPCOMPONENT;
typedef IComponentData*             LPCOMPONENTDATA;
typedef IExtendPropertySheet*       LPEXTENDPROPERTYSHEET;
typedef IExtendContextMenu*         LPEXTENDCONTEXTMENU;
typedef IExtendControlbar*          LPEXTENDCONTROLBAR;
typedef IResultDataCompare*         LPRESULTDATACOMPARE;
typedef ISnapinAbout*               LPSNAPABOUT;
typedef IResultOwnerData*           LPRESULTOWNERDATA;

///////////////////////////////////////////////////////////////////////////////
// Published Common Console ListView constants

#define LVS_ICON                0x0000
#define LVS_REPORT              0x0001
#define LVS_SMALLICON           0x0002
#define LVS_LIST                0x0003
#define LVSICF_NOINVALIDATEALL  0x00000001
#define LVSICF_NOSCROLL         0x00000002

const long  MMCLV_AUTO = -1;
const long  MMCLV_NOPARAM = -2;
const long  MMCLV_NOICON = -1;
const long  MMCLV_VIEWSTYLE_ICON = LVS_ICON;
const long  MMCLV_VIEWSTYLE_SMALLICON = LVS_SMALLICON;
const long  MMCLV_VIEWSTYLE_LIST = LVS_LIST;
const long  MMCLV_VIEWSTYLE_REPORT = LVS_REPORT;
const long  MMCLV_VIEWSTYLE_FILTERED = 0x0004;
const void* MMCLV_NOPTR = 0x0;
const long  MMCLV_UPDATE_NOINVALIDATEALL = LVSICF_NOINVALIDATEALL;
const long  MMCLV_UPDATE_NOSCROLL = LVSICF_NOSCROLL;

static unsigned short* MMC_CALLBACK = ((unsigned short *)(-1));

///////////////////////////////////////////////////////////////////////////////
// ResultData and Scope Data item structures.

typedef long    HSCOPEITEM;
typedef long    COMPONENTID;
typedef long    HRESULTITEM;

const DWORD RDI_STR     = 0x0002;
const DWORD RDI_IMAGE   = 0x0004;
const DWORD RDI_STATE   = 0x0008;
const DWORD RDI_PARAM   = 0x0010;
const DWORD RDI_INDEX   = 0x0020;
const DWORD RDI_INDENT  = 0x0040;


typedef enum _MMC_RESULT_VIEW_STYLE
{
    MMC_SINGLESEL       = 0x0001,
    MMC_SHOWSELALWAYS   = 0x0002,
    MMC_NOSORTHEADER    = 0x0004

} MMC_RESULT_VIEW_STYLE;


// List view with single select
const long MMC_VIEW_OPTIONS_NONE            = 0x0000;

// NO List view. Only custom views.
const long MMC_VIEW_OPTIONS_NOLISTVIEWS     = 0x0001;

// List view with multi select.
const long MMC_VIEW_OPTIONS_MULTISELECT     = 0x0002;
 
//List view with user owned data
const long MMC_VIEW_OPTIONS_OWNERDATALIST   = 0x0004;

//List view with filtering allowed
const long MMC_VIEW_OPTIONS_FILTERED        = 0x0008;

// Create new control (don't use cached)
const long MMC_VIEW_OPTIONS_CREATENEW       = 0x0010;

// Property sheet options
const DWORD MMC_PSO_NOAPPLYNOW              = 0x00000001;
const DWORD MMC_PSO_HASHELP                 = 0x00000002;
const DWORD MMC_PSO_NEWWIZARDTYPE           = 0x00000004;

 

// Type of controls that can be attached to the IControlbar
typedef enum  _MMC_CONTROL_TYPE
{
    TOOLBAR,
    MENUBUTTON,
    COMBOBOXBAR
} MMC_CONTROL_TYPE;


///////////////////////////////////////////////////////////////////////////////
// Console commands - These should be reviewed
//
typedef enum _MMC_CONSOLE_VERB
{
    MMC_VERB_NONE            = 0x0000,
    MMC_VERB_OPEN            = 0x8000,
    MMC_VERB_COPY            = 0x8001, 
    MMC_VERB_PASTE           = 0x8002, 
    MMC_VERB_DELETE          = 0x8003, 
    MMC_VERB_PROPERTIES      = 0x8004, 
    MMC_VERB_RENAME          = 0x8005, 
    MMC_VERB_REFRESH         = 0x8006,      
    MMC_VERB_PRINT           = 0x8007, 
    
} MMC_CONSOLE_VERB;

// Structure to create buttons on the toolbar
typedef struct _MMCButton
{
    int      nBitmap;       // Offset into the bitmap list 
    int      idCommand;     // Command ID return when the button is clicked
    BYTE     fsState;       // TBSTYLE_ENABLED ..etc
    BYTE     fsType;        // TBSTYLE_BUTTON || TBSTYLE_SEP
    LPOLESTR     lpButtonText;  // Text value for the Button
    LPOLESTR     lpTooltipText; // Text value for the tooltip
    
} MMCBUTTON;

typedef MMCBUTTON* LPMMCBUTTON;

typedef enum _MMC_BUTTON_STATE
{
    ENABLED         = 0x01,
    CHECKED         = 0x02,
    HIDDEN          = 0x04,
    INDETERMINATE   = 0x08,
    BUTTONPRESSED   = 0x10,

} MMC_BUTTON_STATE;

typedef struct _RESULTDATAITEM
{
    DWORD       mask;
    BOOL        bScopeItem;
    HRESULTITEM itemID;
    int         nIndex;
    int         nCol;
    LPOLESTR    str;
    int         nImage;
    UINT        nState;
    LPARAM      lParam;
    int         iIndent;
} RESULTDATAITEM;

typedef RESULTDATAITEM* LPRESULTDATAITEM;

// Find result item options   
const DWORD RFI_PARTIAL = 0x0001;
const DWORD RFI_WRAP    = 0x0002;

typedef struct _RESULTFINDINFO
{
    LPOLESTR    psz;
    int         nStart;
    DWORD       dwOptions;
}
 RESULTFINDINFO;
typedef RESULTFINDINFO* LPRESULTFINDINFO;

//
// Sort Result Items options
//
const DWORD RSI_DESCENDING = 0x0001;


const DWORD SDI_STR         = 0x00002;
const DWORD SDI_IMAGE       = 0x00004;
const DWORD SDI_OPENIMAGE   = 0x00008;
const DWORD SDI_STATE       = 0x00010;
const DWORD SDI_PARAM       = 0x00020;
const DWORD SDI_CHILDREN    = 0x00040;

// The top 4 bit of the mask determines the relative position of this item,
// relative to the SCOPEDATAITEM::relativeID. By default it is the parent.

// For SDI_PARENT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the parent.
// As you can see by the SDI_PARENT value it is a no-op. Since by default
// SCOPEDATAITEM::relativeID is treated as the parents ID.
const DWORD SDI_PARENT      = 0x00000000;

// For SDI_PREVIOUS, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the previous sibling
const DWORD SDI_PREVIOUS    = 0x10000000;

// For SDI_NEXT, SCOPEDATAITEM::relativeID is the HSCOPEITEM of the next sibling.
const DWORD SDI_NEXT        = 0x20000000;

// For SDI_PARENT, bit 27 determines whether the item is to be inserted as the
// first child. By default this item will inserted as the last child.
const DWORD SDI_FIRST       = 0x08000000;


typedef struct _SCOPEDATAITEM
{
    DWORD       mask;
    LPOLESTR    displayname;
    int         nImage;
    int         nOpenImage;
    UINT        nState;
    int         cChildren;
    LPARAM      lParam;
    HSCOPEITEM  relativeID;
    HSCOPEITEM  ID;
} SCOPEDATAITEM;

typedef SCOPEDATAITEM* LPSCOPEDATAITEM;

typedef enum _MMC_SCOPE_ITEM_STATE
{
    MMC_SCOPE_ITEM_STATE_NORMAL = 0x0001,        // Not bold. To set or get.
    MMC_SCOPE_ITEM_STATE_BOLD = 0x0002,          // To set or get.
    MMC_SCOPE_ITEM_STATE_EXPANDEDONCE = 0x0003,  // Only to get.
    
} MMC_SCOPE_ITEM_STATE;


typedef struct _CONTEXTMENUITEM
{
    LPWSTR      strName;
    LPWSTR      strStatusBarText;
    LONG        lCommandID;
    LONG        lInsertionPointID;
    LONG        fFlags;
    LONG        fSpecialFlags;
} CONTEXTMENUITEM;

typedef CONTEXTMENUITEM* LPCONTEXTMENUITEM;

//
// Console defined menu command IDs
//   The console reserves the negative numbers for predefined menu command
//   IDs which it sends to a snapin's IExtendContextMenu::Command method  
//
typedef enum _MMC_MENU_COMMAND_IDS
{
    MMCC_STANDARD_VIEW_SELECT = -1
} MMC_MENU_COMMAND_IDS;



//IMenuButton data structure

typedef struct _MENUBUTTONDATA
{
    int      idCommand;
    int      x;
    int      y;
} MENUBUTTONDATA;

typedef MENUBUTTONDATA* LPMENUBUTTONDATA;


//  For multi select the cookie passed to the snapins will be 
//  MMC_MULTI_SELECT_COOKIE. The data object that will be returned 
//  should provide the CCF_OBJECT_TYPES_IN_MULTI_SELECT clipboard
//  format.
// 
const long MMC_MULTI_SELECT_COOKIE = -2;

// Special cookie value for requesting window properties data object
const long MMC_WINDOW_COOKIE = -3;

//IQuickFilter data structure

// Published filter constants
#define FILTER_TYPE_STRING  1
#define FILTER_TYPE_INT     3

typedef enum _MMC_FILTER_TYPE
{
    MMC_STRING_FILTER = FILTER_TYPE_STRING,
    MMC_INT_FILTER =    FILTER_TYPE_INT
} MMC_FILTER_TYPE;
         
typedef struct _FILTERDATA
{
    DWORD       dwFlags;	    // reserved (should be zero)
    DWORD       dwType;		    // one of the FILTER_TYPE_<bla> values
    INT         iFilter;		// filter value if int type filter
    LPOLESTR   pszFilter;    	// filter value, if string filter
    INT         cchFilter;		// max size of string filter value
} FILTERDATA, *LPFILTERDATA;

typedef enum _MMC_FILTER_CHANGE_CODE
{
    MFCC_DISABLE      = 0,
    MFCC_ENABLE       = 1,
    MFCC_VALUE_CHANGE = 2
} MMC_FILTER_CHANGE_CODE;
 
/*
NOTIFICATIONS
=============

Notify(dataobject, event, arg, param);
    For all the MMC_NOTIFY_TYPE events, 
    dataobject
        For single select:
            dataobject for cookie, can be NULL when dataobject is not required
        For multi select:
            Console supplied data object. Supports only one format (CCF_MULTI_SELECT_SNAPIN),

⌨️ 快捷键说明

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