217 lines
7.1 KiB
Plaintext
217 lines
7.1 KiB
Plaintext
// Copyright (c) 1997-1999 Microsoft Corporation
|
|
// hmmv.odl : type library source for OLE Control project.
|
|
|
|
// This file will be processed by the Make Type Library (mktyplib) tool to
|
|
// produce the type library (hmmv.tlb) that will become a resource in
|
|
// hmmv.ocx.
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////
|
|
//////////////////// PROPERTIES //////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////
|
|
|
|
// VARIANT ObjectPath
|
|
// Set this property to the WMI object path of the object or class
|
|
// that you wish to view.
|
|
//
|
|
//
|
|
// long StatusCode
|
|
// The most recent status code is stored here from selecting an object
|
|
// path.
|
|
//
|
|
//
|
|
// BSTR NameSpace
|
|
// Set the NameSpace property to select a namespace.
|
|
//
|
|
//
|
|
// long StudioModeEnabled
|
|
// Set this property to TRUE to allow editing of classes, FALSE
|
|
// for browsing only.
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////
|
|
//////////////////// METHODS //////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////
|
|
|
|
//**************************************************************
|
|
// ShowInstances
|
|
//
|
|
// This method shows a multiple instance view of the instances specified
|
|
// by the array of object paths.
|
|
//
|
|
// Parameters:
|
|
// [in] LPCTSTR pszTitle
|
|
// The view title.
|
|
//
|
|
// [in] const VARIANT FAR& varPathArray
|
|
// An variant array containing the HMOM paths to the instances.
|
|
//
|
|
// Returns:
|
|
// Nothing.
|
|
//
|
|
//****************************************************************
|
|
// SaveState
|
|
//
|
|
// Save any WMI objects that have been modified.
|
|
//
|
|
// Parameters:
|
|
// [in] BOOL bPromptUser
|
|
// TRUE if the user should be prompted as to whether or
|
|
// not the state should be saved.
|
|
//
|
|
// [in] BOOL bUserCanCancel
|
|
//
|
|
// Returns:
|
|
// long
|
|
// S_OK if the state was saved, E_FAIL if something went
|
|
// wrong or if the user canceled the save.
|
|
//
|
|
//**************************************************************
|
|
// QueryViewInstances
|
|
//
|
|
//
|
|
// Parameters:
|
|
// LPCTSTR pszLabel
|
|
//
|
|
// LPCTSTR pszQueryType
|
|
//
|
|
// LPCTSTR pszQuery
|
|
//
|
|
// LPCTSTR pszClass
|
|
//
|
|
// Returns:
|
|
// Nothing.
|
|
//
|
|
//********************************************************************
|
|
|
|
|
|
|
|
|
|
//_____________________________________________________________________
|
|
///////////////////////////////////////////////////////////////////////
|
|
//////////////////// EVENTS ///////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////
|
|
//_____________________________________________________________________
|
|
|
|
|
|
//*********************************************************************
|
|
// GetIWbemServices
|
|
//
|
|
// The WBEMViewContainer container fires this event when it needs to get an IWbemServices
|
|
// pointer for the current namespace and object path.
|
|
//
|
|
// Parameters:
|
|
// [in] BSTR szNamespace
|
|
// The desired namespace.
|
|
//
|
|
// [in] VARIANT* pvarUpdatePointer
|
|
// The singleview will set the type of this variant to VT_I4 and its lVal
|
|
// to FALSE. A value of FALSE means that a new services pointer should be
|
|
// returned via pvarServices.
|
|
//
|
|
// [in, out] VARIANT* pvarServices
|
|
// The IWbemServices pointer is returned in the punkVal member of the variant.
|
|
//
|
|
// [in, out] VARIANT* pvarSc
|
|
// The SCODE value for the login is returned via the lVal member of this variant.
|
|
// The type of this variant must be VT_I4.
|
|
//
|
|
// [in, out] VARIANT* pvarUserCancel
|
|
// The boolVal member of the variant is set to TRUE if the user cancelled the
|
|
// services login, FALSE otherwise. The vt member must be VT_BOOL.
|
|
//
|
|
//*********************************************************************
|
|
// NOTIFYChangeRootOrNamespace
|
|
//
|
|
// The WBEMViewContainer container fires this event to indicate that the user has changed the
|
|
// root or namespace.
|
|
//
|
|
// Parameters;
|
|
// [in] BSTR szRootOrNamespace
|
|
// The path to the new root or namesapce.
|
|
//
|
|
// [in] long bChangeNamespace
|
|
// TRUE to if szRootOrNamespace containes the new namespace, FALSE if
|
|
// szRootOrNamespace contains a root path.
|
|
//
|
|
// [in] long bEchoSelectObject
|
|
// TRUE if a select object should be echoed.
|
|
//
|
|
// Returns:
|
|
// Nothing.
|
|
//
|
|
//*********************************************************************
|
|
|
|
#include <olectl.h>
|
|
#include <idispids.h>
|
|
|
|
[ uuid(5B3572A8-D344-11CF-99CB-00C04FD64497), version(1.0),
|
|
helpstring("WMI Object Viewer Container Control"), control ]
|
|
library HMMVLib
|
|
{
|
|
importlib(STDOLE_TLB);
|
|
importlib(STDTYPE_TLB);
|
|
|
|
// Primary dispatch interface for CWBEMViewContainerCtrl
|
|
|
|
[ uuid(5B3572A9-D344-11CF-99CB-00C04FD64497),
|
|
helpstring("Dispatch interface for WMI Object Viewer Container Control"), hidden ]
|
|
dispinterface _DWBEMViewContainer
|
|
{
|
|
properties:
|
|
// NOTE - ClassWizard will maintain property information here.
|
|
// Use extreme caution when editing this section.
|
|
//{{AFX_ODL_PROP(CWBEMViewContainerCtrl)
|
|
[id(2), helpstring("Path to Current WMI Object or Class")] VARIANT ObjectPath;
|
|
[id(1), helpstring("Status of Most Recent Selection")] long StatusCode;
|
|
[id(3), helpstring("Current Namespace")] BSTR NameSpace;
|
|
[id(4), helpstring("Edit or Browse Switch Status")] long StudioModeEnabled;
|
|
[id(DISPID_READYSTATE), helpstring("Download Status"), readonly] long ReadyState;
|
|
[id(5)] long PropertyFilter;
|
|
//}}AFX_ODL_PROP
|
|
|
|
methods:
|
|
// NOTE - ClassWizard will maintain method information here.
|
|
// Use extreme caution when editing this section.
|
|
//{{AFX_ODL_METHOD(CWBEMViewContainerCtrl)
|
|
[id(6), helpstring("Display Multiple Instances")] void ShowInstances(BSTR szTitle, VARIANT varPathArray);
|
|
[id(7), helpstring("Save Modified WMI Objects")] long SaveState(long bPromptUser, long bUserCanCancel);
|
|
[id(8), helpstring("Display Query Results")] void QueryViewInstances(BSTR pLabel, BSTR pQueryType, BSTR pQuery, BSTR pClass);
|
|
//}}AFX_ODL_METHOD
|
|
};
|
|
|
|
// Event dispatch interface for CWBEMViewContainerCtrl
|
|
|
|
[ uuid(5B3572AA-D344-11CF-99CB-00C04FD64497),
|
|
helpstring("Event interface for WMI Object Viewer Container Control") ]
|
|
dispinterface _DWBEMViewContainerEvents
|
|
{
|
|
properties:
|
|
// Event interface has no properties
|
|
|
|
methods:
|
|
// NOTE - ClassWizard will maintain event information here.
|
|
// Use extreme caution when editing this section.
|
|
//{{AFX_ODL_EVENT(CWBEMViewContainerCtrl)
|
|
[id(1)] void GetIWbemServices(BSTR szNamespace, VARIANT* pvarUpdatePointer, VARIANT* pvarServices, VARIANT* pvarSc, VARIANT* pvarUserCancel);
|
|
[id(2)] void NOTIFYChangeRootOrNamespace(BSTR szRootOrNamespace, long bChangeNamespace, long bEchoSelectObject);
|
|
[id(DISPID_READYSTATECHANGE)] void ReadyStateChange();
|
|
[id(3)] void RequestUIActive();
|
|
//}}AFX_ODL_EVENT
|
|
};
|
|
|
|
// Class information for CWBEMViewContainerCtrl
|
|
|
|
[ uuid(5B3572AB-D344-11CF-99CB-00C04FD64497),
|
|
helpstring("WMI Object Viewer Container Control"), control ]
|
|
coclass ObjectViewerContainer
|
|
{
|
|
[default] dispinterface _DWBEMViewContainer;
|
|
[default, source] dispinterface _DWBEMViewContainerEvents;
|
|
};
|
|
|
|
|
|
//{{AFX_APPEND_ODL}}
|
|
};
|