WindowsXP-SP1/admin/controls/smonctrl/smonctrl.odl
2020-09-30 16:53:49 +02:00

708 lines
22 KiB
Plaintext

/*++
Copyright (C) 1996-1999 Microsoft Corporation
Module Name:
smonctrl.odl
Abstract:
<abstract>
--*/
#include <olectl.h>
#define DISPID_VALUE 0
#define DISPID_NEWENUM -4
//LIBID_SystemMonitor
[
uuid(1B773E42-2509-11cf-942F-008029004347)
, helpstring("System Monitor Control")
, lcid(0x0000)
, version(3.4)
]
library SystemMonitor
{
//importlib("stdole32.tlb");
importlib(STDOLE_TLB);
importlib(STDTYPE_TLB);
// Display type constants
typedef
[
helpstring("System Monitor display type constants")
]
enum eDisplayTypeConstant {
[helpstring("Line graph.")] sysmonLineGraph = 0x0001,
[helpstring("Histogram.")] sysmonHistogram = 0x0002,
[helpstring("Report.")] sysmonReport = 0x0003
} DisplayTypeConstants;
// Report value type constants
typedef
[
helpstring("System Monitor report value type constants")
]
enum eReportValueTypeConstant {
[helpstring("Use default.")]
sysmonDefaultValue = 0x0000,
[helpstring("Current value.")]
sysmonCurrentValue = 0x0001,
[helpstring("Average value over the graph display interval.")]
sysmonAverage = 0x0002,
[helpstring("Minimum value in the graph display interval.")]
sysmonMinimum = 0x0003,
[helpstring("Maximum value in the graph display interval.")]
sysmonMaximum = 0x0004
} ReportValueTypeConstants;
// Data source type constants
typedef
[
helpstring("System Monitor data source type constants")
]
enum eDataSourceTypeConstant {
[helpstring("No data source.")] sysmonNullDataSource = 0xFFFFFFFF,
[helpstring("Current activity.")] sysmonCurrentActivity = 0x0001,
[helpstring("Log files.")] sysmonLogFiles = 0x0002,
[helpstring("SQL Log.")] sysmonSqlLog = 0x0003
} DataSourceTypeConstants;
//IID_ICounterItem
[
uuid(771A9520-EE28-11ce-941E-008029004347)
, helpstring("Definition of interface ICounterItem")
, hidden
, odl
]
interface ICounterItem : IUnknown
{
//Properties
[id(DISPID_VALUE), propget, helpstring("Current value.")]
HRESULT Value([out, retval] double *pdblValue);
[id(1), propput, helpstring("Color.")]
HRESULT Color([in] OLE_COLOR Color);
[id(1), propget]
HRESULT Color([out, retval] OLE_COLOR *pColor);
[id(2), propput, helpstring("Width.")]
HRESULT Width([in] INT iWidth);
[id(2), propget]
HRESULT Width([out, retval] INT *piValue);
[id(3), propput, helpstring("Line style.")]
HRESULT LineStyle([in] INT iLineStyle);
[id(3), propget]
HRESULT LineStyle([out, retval] INT *piValue);
[id(4), propput, helpstring("Scale factor.")]
HRESULT ScaleFactor([in] INT iScale);
[id(4), propget]
HRESULT ScaleFactor([out, retval] INT *piValue);
[id(5), propget]
HRESULT Path([out, retval] BSTR *pstrValue);
//Beta 1: [id(6), propget, helpstring("Current value.")]
HRESULT GetValue([out]double *Value, [out]long *Status);
HRESULT GetStatistics([out]double *Max, [out]double *Min,
[out]double *Avg, [out]long *Status);
}
//DIID_DICounterItem
[
uuid(C08C4FF2-0E2E-11cf-942C-008029004347)
, hidden
, helpstring("Definition of dispinterface DICounterItem")
]
dispinterface DICounterItem
{
interface ICounterItem;
}
//
// IID_ICounters
//
[
uuid(79167962-28FC-11cf-942F-008029004347),
helpstring("Counter collection"),
dual,
hidden,
odl
]
interface ICounters : IDispatch
{
[propget]
HRESULT Count([out,retval]long *pLong);
[propget, restricted, id(DISPID_NEWENUM)]
HRESULT _NewEnum([out,retval]IUnknown** ppIunk);
[propget, id(DISPID_VALUE)]
HRESULT Item([in]VARIANT index,[out,retval]DICounterItem **ppI);
HRESULT Add([in]BSTR pathname, [out,retval]DICounterItem **ppI);
HRESULT Remove([in]VARIANT index);
}
//IID_ILogFileItem
[
uuid(D6B518DD-05C7-418a-89E6-4F9CE8C6841E)
, helpstring("Definition of interface ILogFileItem")
, hidden
, odl
]
interface ILogFileItem : IUnknown
{
//Properties
[id(DISPID_VALUE), propget, helpstring("Log file path.")]
HRESULT Path([out, retval] BSTR *pstrValue);
}
//DIID_DILogFileItem
[
uuid(8D093FFC-F777-4917-82D1-833FBC54C58F)
, hidden
, helpstring("Definition of dispinterface DILogFileItem")
]
dispinterface DILogFileItem
{
interface ILogFileItem;
}
//
// IID_ILogFiles
//
[
uuid(6A2A97E6-6851-41ea-87AD-2A8225335865),
helpstring("Log file collection"),
dual,
hidden,
odl
]
interface ILogFiles : IDispatch
{
[propget]
HRESULT Count([out,retval]long *pLong);
[propget, restricted, id(DISPID_NEWENUM)]
HRESULT _NewEnum([out,retval]IUnknown** ppIunk);
[propget, id(DISPID_VALUE)]
HRESULT Item([in]VARIANT index,[out,retval]DILogFileItem **ppI);
HRESULT Add([in]BSTR pathname, [out,retval]DILogFileItem **ppI);
HRESULT Remove([in]VARIANT index);
}
//
// IID_ISystemMonitor
//
[
uuid(194EB241-C32C-11cf-9398-00AA00A3DDEA)
, helpstring("Definition of interface ISystemMonitor")
, hidden
, odl
]
interface ISystemMonitor : IUnknown
{
//Properties
[id(DISPID_APPEARANCE), propget, helpstring("The appearance.")]
HRESULT Appearance([out, retval] INT *iAppearance);
[id(DISPID_APPEARANCE), propput]
HRESULT Appearance([in] INT iAppearance);
[id(DISPID_BACKCOLOR), propget, helpstring("The background color.")]
HRESULT BackColor([out, retval] OLE_COLOR *pColor);
[id(DISPID_BACKCOLOR), propput]
HRESULT BackColor([in] OLE_COLOR Color);
[id(DISPID_BORDERSTYLE), propget, helpstring("The border style.")]
HRESULT BorderStyle([out, retval] INT *iBorderStyle);
[id(DISPID_BORDERSTYLE), propput]
HRESULT BorderStyle([in] INT iBorderStyle);
[id(DISPID_FORECOLOR), propget, helpstring("The foreground color.")]
HRESULT ForeColor([out, retval] OLE_COLOR *pColor);
[id(DISPID_FORECOLOR), propput]
HRESULT ForeColor([in] OLE_COLOR Color);
[id(DISPID_FONT), propget, helpstring("The font for all text.")]
HRESULT Font([out,retval] IFontDisp **ppFont);
[id(DISPID_FONT), propputref]
HRESULT Font([in] IFontDisp *pFont);
[id(DISPID_VALUE), propget, helpstring("The counter collection.")]
HRESULT Counters([out, retval] ICounters **ppICounters);
[id(1), propput, helpstring("Show vertical grid.")]
HRESULT ShowVerticalGrid([in] boolean bState);
[id(1), propget]
HRESULT ShowVerticalGrid([out, retval] boolean *pbState);
[id(2), propput, helpstring("Show horizontal grid.")]
HRESULT ShowHorizontalGrid([in] boolean bState);
[id(2), propget]
HRESULT ShowHorizontalGrid([out, retval] boolean *pbState);
[id(3), propput, helpstring("Show counters legend.")]
HRESULT ShowLegend([in] boolean bState);
[id(3), propget]
HRESULT ShowLegend([out, retval] boolean *pbState);
[id(4), propput, helpstring("Show scale labels.")]
HRESULT ShowScaleLabels([in] boolean bState);
[id(4), propget]
HRESULT ShowScaleLabels([out, retval] boolean *pbState);
[id(5), propput, helpstring("Show value bar.")]
HRESULT ShowValueBar([in] boolean bState);
[id(5), propget]
HRESULT ShowValueBar([out, retval] boolean *pbState);
[id(6), propput, helpstring("Maximum scale value.")]
HRESULT MaximumScale([in] INT iValue);
[id(6), propget]
HRESULT MaximumScale([out, retval] INT *piValue);
[id(7), propput, helpstring("Minimum scale value.")]
HRESULT MinimumScale([in] INT iValue);
[id(7), propget]
HRESULT MinimumScale([out, retval] INT *piValue);
[id(8), propput, helpstring("Data sample interval.")]
HRESULT UpdateInterval([in] FLOAT fValue);
[id(8), propget]
HRESULT UpdateInterval([out, retval] FLOAT *pfValue);
[id(9), propput, helpstring("Display type.")]
HRESULT DisplayType([in] DisplayTypeConstants eDisplayType);
[id(9), propget]
HRESULT DisplayType([out, retval] DisplayTypeConstants *peDisplayType);
[id(10), propput, helpstring("Manual update.")]
HRESULT ManualUpdate([in] boolean bState);
[id(10), propget]
HRESULT ManualUpdate([out, retval] boolean *pbState);
[id(11), propput, helpstring("Graph title.")]
HRESULT GraphTitle([in] BSTR bsTitle);
[id(11), propget]
HRESULT GraphTitle([out, retval] BSTR *pbsTitle);
[id(12), propput, helpstring("Y axis label.")]
HRESULT YAxisLabel([in] BSTR bsTitle);
[id(12), propget]
HRESULT YAxisLabel([out, retval] BSTR *pbsTitle);
//Beta 1: [id(13), propget, helpstring("Counter collection.")]
[id(14), helpstring("Collect sample for each counter.")]
HRESULT CollectSample(void);
[id(15), helpstring("Apply visual changes to graph.")]
HRESULT UpdateGraph(void);
[id(16), helpstring("Display counter browser.")]
HRESULT BrowseCounters(void);
[id(17), helpstring("Display properties.")]
HRESULT DisplayProperties(void);
[id(18), hidden]
HRESULT Counter([in] INT iIndex, [out] ICounterItem **ppICounter);
[id(19), hidden]
HRESULT AddCounter([in] BSTR bsPath, [out] ICounterItem **ppICounter);
[id(20), hidden]
HRESULT DeleteCounter([in] ICounterItem *pCtr);
[id(21), propget, helpstring("Control panel background color.")]
HRESULT BackColorCtl([out, retval] OLE_COLOR *pColor);
[id(21), propput]
HRESULT BackColorCtl([in] OLE_COLOR Color);
[id(22), propput, helpstring("Log file name.")]
HRESULT LogFileName([in] BSTR bsFileName);
[id(22), propget]
HRESULT LogFileName([out, retval] BSTR *bsFileName);
[id(23), propput, helpstring("Start time of log file view.")]
HRESULT LogViewStart([in] DATE StartTime);
[id(23), propget]
HRESULT LogViewStart([out, retval] DATE *StartTime);
[id(24), propput, helpstring("Stop time of log file view.")]
HRESULT LogViewStop([in] DATE StopTime);
[id(24), propget]
HRESULT LogViewStop([out, retval] DATE *StopTime);
[id(25), propget, helpstring("Graph grid color.")]
HRESULT GridColor([out, retval] OLE_COLOR *pColor);
[id(25), propput]
HRESULT GridColor([in] OLE_COLOR Color);
[id(26), propget, helpstring("Graph time bar color.")]
HRESULT TimeBarColor([out, retval] OLE_COLOR *pColor);
[id(26), propput]
HRESULT TimeBarColor([in] OLE_COLOR Color);
[id(27), propget, helpstring("Highlight the selected counter..")]
HRESULT Highlight([out, retval] boolean *pbState);
[id(27), propput]
HRESULT Highlight([in] boolean bState);
[id(28), propget, helpstring("Show the toolbar")]
HRESULT ShowToolbar([out, retval] boolean *pbState);
[id(28), propput]
HRESULT ShowToolbar([in] boolean bState);
[id(29), helpstring("Paste Counters from clipboard.")]
HRESULT Paste (void);
[id(30), helpstring("Copy Counters to clipboard.")]
HRESULT Copy (void);
[id(31), helpstring("Delete all counters in the control.")]
HRESULT Reset (void);
[id(32), propput, helpstring("Disallow property modifications.")]
HRESULT ReadOnly([in] boolean bState);
[id(32), propget]
HRESULT ReadOnly([out, retval] boolean *pbState);
[id(33), propput, helpstring("Report value.")]
HRESULT ReportValueType([in] ReportValueTypeConstants eReportValueType);
[id(33), propget]
HRESULT ReportValueType([out, retval] ReportValueTypeConstants *peReportValueType);
[id(34), propput, helpstring("Allow monitoring of duplicate counter instances.")]
HRESULT MonitorDuplicateInstances([in] boolean bState);
[id(34), propget]
HRESULT MonitorDuplicateInstances([out, retval] boolean* pbState);
[id(35), propput, helpstring("Number of samples per display interval.")]
HRESULT DisplayFilter([in] INT iValue);
[id(35), propget]
HRESULT DisplayFilter([out, retval] INT* piValue);
[id(36), propget, helpstring("The log file collection.")]
HRESULT LogFiles([out, retval] ILogFiles** ppILogFiles);
[id(37), propput, helpstring("Data source type.")]
HRESULT DataSourceType([in] DataSourceTypeConstants eDataSourceType);
[id(37), propget]
HRESULT DataSourceType([out, retval] DataSourceTypeConstants *peDataSourceType);
[id(38), propput, helpstring("SQL DSN name.")]
HRESULT SqlDsnName([in] BSTR bsSqlDsnName);
[id(38), propget]
HRESULT SqlDsnName([out, retval] BSTR *bsSqlDsnName);
[id(39), propput, helpstring("SQL logset name.")]
HRESULT SqlLogSetName([in] BSTR bsSqlLogSetName);
[id(39), propget]
HRESULT SqlLogSetName([out, retval] BSTR *bsSqlLogSetName);
}
//
//DIID_DISystemMonitorInternal
//
[
uuid(194EB242-C32C-11cf-9398-00AA00A3DDEA)
, hidden
, helpstring("Definition of dispinterface DISystemMonitorInternal`")
]
dispinterface DISystemMonitorInternal
{
interface ISystemMonitor;
}
//DIID_DISystemMonitor
[
uuid(13D73D81-C32E-11cf-9398-00AA00A3DDEA)
, hidden
, helpstring("Definition of dispinterface DISystemMonitor")
]
dispinterface DISystemMonitor
{
properties:
[id(DISPID_APPEARANCE), helpstring("The appearance.")] INT Appearance;
[id(DISPID_BACKCOLOR), helpstring("The background color.")] OLE_COLOR BackColor;
[id(DISPID_BORDERSTYLE), helpstring("The border style.")] INT BorderStyle;
[id(DISPID_FORECOLOR), helpstring("The foreground color.")] OLE_COLOR ForeColor;
[id(DISPID_FONT), helpstring("The font for all text.")] IFontDisp *Font;
[id(1), helpstring("Show vertical grid.")] boolean ShowVerticalGrid;
[id(2), helpstring("Show horizontal grid.")] boolean ShowHorizontalGrid;
[id(3), helpstring("Show counters legend.")] boolean ShowLegend;
[id(4), helpstring("Show scale labels.")] boolean ShowScaleLabels;
[id(5), helpstring("Show value bar.")] boolean ShowValueBar;
[id(6), helpstring("Maximum scale value.")] INT MaximumScale;
[id(7), helpstring("Minimum scale value.")] INT MinimumScale;
[id(8), helpstring("Data sample interval.")] FLOAT UpdateInterval;
[id(9), helpstring("Display type.")] DisplayTypeConstants DisplayType;
[id(10), helpstring("Manual update.")] boolean ManualUpdate;
[id(11), helpstring("Graph title.")] BSTR GraphTitle;
[id(12), helpstring("Y axis label.")] BSTR YAxisLabel;
[id(DISPID_VALUE), helpstring("The counter collection.")] ICounters *Counters;
//[id(13)] ICounters *Counters;
[id(21), helpstring("Control panel background color.")] OLE_COLOR BackColorCtl;
[id(22), helpstring("Log file name.")] BSTR LogFileName;
[id(23), helpstring("Start time of log file view.")] DATE LogViewStart;
[id(24), helpstring("Stop time of log file view.")] DATE LogViewStop;
[id(25), helpstring("Graph grid color.")] OLE_COLOR GridColor;
[id(26), helpstring("Graph time bar color.")] OLE_COLOR TimeBarColor;
[id(27), helpstring("Highlight the selected counter.")] boolean Highlight;
[id(28), helpstring("Show the toolbar")] boolean ShowToolbar;
[id(32), helpstring("Disallow property modifications.")] boolean ReadOnly;
[id(33), helpstring("Report value.")] ReportValueTypeConstants ReportValueType;
[id(34), helpstring("Allow monitoring of duplicate counter instances.")] boolean MonitorDuplicateInstances;
[id(35), helpstring("Number of samples per display interval.")] INT DisplayFilter;
[id(36), helpstring("The log file collection.")] ILogFiles* LogFiles;
[id(37), helpstring("Data source type.")] DataSourceTypeConstants DataSourceType;
[id(38), helpstring("SQL DSN name.")] BSTR SqlDsnName;
[id(39), helpstring("SQL logset name.")] BSTR SqlLogSetName;
methods:
[id(14), helpstring("Collect sample for each counter.")]
void CollectSample(void);
[id(15), helpstring("Apply visual changes to graph.")]
void UpdateGraph(void);
[id(16), helpstring("Display counter browser.")]
void BrowseCounters(void);
[id(17), helpstring("Display properties.")]
void DisplayProperties(void);
/*
[id(18), hidden]
void Counter([in] INT iIndex, [out] ICounterItem **ppICounter);
[id(19), hidden]
void AddCounter([in] BSTR bsPath, [out] ICounterItem **ppICounter);
[id(20), hidden]
void DeleteCounter([in] ICounterItem *pCtr);
*/
[id(29), helpstring("Paste Counters from clipboard.")]
void Paste (void);
[id(30), helpstring("Copy Counters to clipboard.")]
void Copy (void);
[id(31), helpstring("Delete all counters in the control.")]
void Reset (void);
}
//IID_ISystemMonitorEvents
[
uuid(EE660EA0-4ABD-11cf-943A-008029004347)
, helpstring("System Monitor Events")
, odl
]
interface ISystemMonitorEvents : IUnknown
{
[id(1), helpstring("A counter was selected.")]
void OnCounterSelected([in] INT Index);
[id(2), helpstring("A counter was added.")]
void OnCounterAdded([in] INT Index);
[id(3), helpstring("A counter was deleted.")]
void OnCounterDeleted([in] INT Index);
[id(4), helpstring("A sample of all counter values was collected.")]
void OnSampleCollected(void);
[id(5), helpstring("The left mouse button was double clicked.")]
void OnDblClick([in] INT Index);
}
//
// DIID_DISystemMonitorEvents
//
[
uuid(84979930-4AB3-11cf-943A-008029004347)
, helpstring("System Monitor Events")
]
dispinterface DISystemMonitorEvents
{
properties:
methods:
[id(1), helpstring("A counter was selected.")]
void OnCounterSelected([in] INT iIndex);
[id(2), helpstring("A counter was added.")]
void OnCounterAdded([in] INT iIndex);
[id(3), helpstring("A counter was deleted.")]
void OnCounterDeleted([in] INT iIndex);
[id(4), helpstring("A sample of all counter values was collected.")]
void OnSampleCollected(void);
[id(5), helpstring("The left mouse button was double clicked.")]
void OnDblClick([in ] INT Index);
}
//
// CLSID_SystemMonitor
//
[
uuid(C4D2D8E0-D1DD-11ce-940F-008029004347)
, helpstring("System Monitor Control Type Information")
, control
]
coclass SystemMonitor
{
[default] dispinterface DISystemMonitor;
interface ISystemMonitor;
[default, source] dispinterface DISystemMonitorEvents;
}
//
// CLSID_CounterItem
//
[
uuid(C4D2D8E0-D1DD-11ce-940F-008029004348)
, helpstring("System Monitor Counter Item Type Information")
, control
]
coclass CounterItem
{
[default] dispinterface DICounterItem;
interface ICounterItem;
}
//
// CLSID_Counters
//
[
uuid(B2B066D2-2AAC-11cf-942F-008029004347)
, helpstring("System Monitor Counter Collection Type Information")
]
coclass Counters
{
interface ICounters;
}
//
// CLSID_LogFileItem
//
[
uuid(16EC5BE8-DF93-4237-94E4-9EE918111D71)
, helpstring("System Monitor Log File Item Type Information")
, control
]
coclass LogFileItem
{
[default] dispinterface DILogFileItem;
interface ILogFileItem;
}
//
// CLSID_LogFiles
//
[
uuid(2735D9FD-F6B9-4f19-A5D9-E2D068584BC5)
, helpstring("System Monitor Log File Collection Type Information")
]
coclass LogFiles
{
interface ILogFiles;
}
};