2025-04-27 07:49:33 -04:00

350 lines
9.7 KiB
Plaintext

// Copyright (c) 1997-1999 Microsoft Corporation
// Win32LogicalDisk.odl : type library source for ActiveX Control project.
//
//*********************************************************************
// QueryNeedsSave
//
// Query to determine whether the currently selected object has
// been modified and needs to be saved. If the object has been
// modified, it can be saved by calling "SaveData".
//
//
// Parameters:
// None.
//
// Returns:
// long
// TRUE if there is something that needs to be saved.
//
//*********************************************************************
// AddContextRef
//
// Increment the reference count for the specified context handle.
//
// Parameters:
// [out] long lCtxtHandle
// The context handle.
//
// Returns:
// long
// S_OK if the reference count was successfully incremented,
// a failure code otherwise.
//
//*********************************************************************
// ReleaseContext
//
// Decrement the reference count for the specified context handle.
//
// Parameters:
// [out] long lCtxtHandle
// The context handle.
//
// Returns:
// long
// S_OK if the reference count was successfully decremented,
// a failure code otherwise.
//
//*********************************************************************
// RestoreContext
//
// Restore the state of this custom view control to the previously saved
// context.
//
// Parameters:
// long lCtxtHandle
// This is the handle of the context to restore to.
//
// Returns:
// long
// S_OK if the view's context could be restored, a failure code
// otherwise.
//
//*********************************************************************
// GetContext
//
// Take a snapshot of the current state of this custom view control,
// save the state in a context object and return a handle to the
// context object. The intial reference count to the context object
// will be one. The context object will be deleted when its reference
// count is decremented to zero.
//
// Parameters:
// [out] long FAR* plCtxtHandle
// This is a pointer to the place to return the context
// handle.
//
// Returns:
// long
// S_OK if the context was returned successfully, E_FAIL
// if not.
//
//*********************************************************************
// GetEditMode
//
// Get the current state of the edit mode flag.
//
// Parameters:
// None.
//
// Returns:
// long
// 0 if the view's data is for browsing only.
// 1 if the view's data can be edited.
//
//*********************************************************************
// SetEditMode
//
// Set the view's edit mode flag.
//
// Parameters:
// [in] long lMode
// 0 if the view's data is for browsing only.
// 1 if the view's data can be edited.
//
// Returns:
// Nothing.
//
//*********************************************************************
// RefreshView
//
// This method causes the contents of the view to be re-loaded from
// the database.
//
// Parameters:
// None.
//
// Returns:
// long
// S_OK if successful, a failure code if some error occurred.
//
//*********************************************************************
// SaveData
//
// Save changes to current object.
//
// Parameters:
// None
//
// Returns:
// long
// S_OK if successful, otherwise a failure code.
//
//*********************************************************************
// SelectObjectByPath
//
// Select the specified object.
//
// Parameters:
// [in] BSTR szObjectPath
// The WBEM object path.
//
// Returns:
// long if the object is selected, a failure code
// otherwise.
//
//*********************************************************************
// ExternInstanceCreated
//
// The container calls this method whenever it creates a new CIMOM
// object instance. This allows a custom view to easily reflect the
// existance of the new object if desired.
//
// Parameters:
// [in] BSTR szObjectPath
// The WBEM object path.
//
// Returns:
// Nothing.
//
//*********************************************************************
// ExternInstanceDeleted
//
// The container calls this method whenever it deletes a CIMOM
// object instance. This allows a custom view to easily reflect the
// non-existance of the specified object if desired.
//
// Parameters:
// [in] BSTR szObjectPath
// The WBEM object path.
//
// Returns:
// Nothing.
//
//*********************************************************************
//_____________________________________________________________________
///////////////////////////////////////////////////////////////////////
//////////////////// EVENTS ///////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//_____________________________________________________________________
//*********************************************************************
// JumpToMultipleInstanceView
//
// The custom view fires this event to request that a multiple instance
// view of an array of object should be displayed.
//
// Parameters:
// [in] BSTR szTitle
// The title to be displayed for the multiple instances.
//
// [in] VARIANT varPathArray
// An array of WBEM object paths.
//
// Returns:
// Nothing.
//
//*********************************************************************
// NotifyContextChanged
//
// Custom views fire this event when the current context changes. This may
// result in the container calling the custom view to get the current context
// so that it can be restored later.
//
// Parameters:
// None.
//
// Returns:
// Nothing.
//
//*********************************************************************
// NotifySaveRequired
//
// The custom view fires this event when the current object is modified.
//
// Parameters:
// None.
//
// Returns:
// Nothing.
//
//*********************************************************************
// NotifyViewModified
//
// A custom view fires this event when the view is modified in some
// way that changes its state, but not necessarily in a way that
// requires the current object to be saved.
//
// Parameters:
// None.
//
// Returns:
// Nothing.
//
//*********************************************************************
// GetIWbemServices
//
// A custom view fires this event to get the IWbemServices pointer for
// a given namespace. The container must catch this event and return
// the requested IWbemServices pointer.
//
// Parameters:
// BSTR szNamespace
// The custom view passes the requested namespace to the container via this
// parameter.
//
// VARIANT* pvarUpdatePointer
//
// VARIANT* pvarServices
//
// VARIANT* pvarSc
//
// VARIANT* pvarUserCancel
//
//***************************************************************************
// This file will be processed by the Make Type Library (mktyplib) tool to
// produce the type library (Win32LogicalDisk.tlb) that will become a resource in
// Win32LogicalDisk.ocx.
#include <olectl.h>
#include <idispids.h>
[ uuid(D5FF1882-0191-11D2-853D-00C04FD7BB08), version(1.0),
helpfile("Win32LogicalDisk.hlp"),
helpstring("Win32LogicalDisk ActiveX Control module"),
control ]
library WIN32LOGICALDISKLib
{
importlib(STDOLE_TLB);
importlib(STDTYPE_TLB);
// Primary dispatch interface for CWin32LogicalDiskCtrl
[ uuid(D5FF1884-0191-11D2-853D-00C04FD7BB08),
helpstring("Dispatch interface for Win32LogicalDisk Control"), hidden ]
dispinterface _DWin32LogicalDisk
{
properties:
// NOTE - ClassWizard will maintain property information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_PROP(CWin32LogicalDiskCtrl)
[id(1)] BSTR NameSpace;
//}}AFX_ODL_PROP
methods:
// NOTE - ClassWizard will maintain method information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(CWin32LogicalDiskCtrl)
[id(2)] long QueryNeedsSave();
[id(3)] long AddContextRef(long lCtxtHandle);
[id(4)] long GetContext(long* plCtxthandle);
[id(5)] long GetEditMode();
[id(6)] void ExternInstanceCreated(BSTR szObjectPath);
[id(7)] void ExternInstanceDeleted(BSTR szObjectPath);
[id(8)] long RefreshView();
[id(9)] long ReleaseContext(long lCtxtHandle);
[id(10)] long RestoreContext(long lCtxtHandle);
[id(11)] long SaveData();
[id(12)] void SetEditMode(long lMode);
[id(13)] long SelectObjectByPath(BSTR szObjectPath);
//}}AFX_ODL_METHOD
[id(DISPID_ABOUTBOX)] void AboutBox();
};
// Event dispatch interface for CWin32LogicalDiskCtrl
[ uuid(D5FF1885-0191-11D2-853D-00C04FD7BB08),
helpstring("Event interface for Win32LogicalDisk Control") ]
dispinterface _DWin32LogicalDiskEvents
{
properties:
// Event interface has no properties
methods:
// NOTE - ClassWizard will maintain event information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_EVENT(CWin32LogicalDiskCtrl)
[id(1)] void JumpToMultipleInstanceView(BSTR szTitle, VARIANT varPathArray);
[id(2)] void NotifyContextChanged();
[id(3)] void NotifySaveRequired();
[id(4)] void NotifyViewModified();
[id(5)] void GetIWbemServices(BSTR szNamespace, VARIANT* pvarUpdatePointer, VARIANT* pvarServices, VARIANT* pvarSc, VARIANT* pvarUserCancel);
[id(6)] void RequestUIActive();
//}}AFX_ODL_EVENT
};
// Class information for CWin32LogicalDiskCtrl
[ uuid(D5FF1886-0191-11D2-853D-00C04FD7BB08),
helpstring("Win32LogicalDisk Control"), control ]
coclass Win32LogicalDisk
{
[default] dispinterface _DWin32LogicalDisk;
[default, source] dispinterface _DWin32LogicalDiskEvents;
};
//{{AFX_APPEND_ODL}}
//}}AFX_APPEND_ODL}}
};