Microsoft KB Archive/298874

{|
 * width="100%"|

MMC SAMPLE: Implementing Scope Nodes

 * }

Q298874

-

The information in this article applies to:


 * Microsoft Management Console, version 2.0

-

This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release.

SUMMARY
The sample project MMC_ScopeNode, which is available through this article, demonstrates how to add multiple levels of scope nodes to an existing snap-in. In order to accomplish this, the sample handles the console notifications MMCN_EXPAND and MMCN_REMOVE_CHILDREN. The console interface method IConsoleNamespace2::InsertItem is used to insert the scope nodes.

MORE INFORMATION
The file MMC_ScopeNode contains the C++ source files to build a snap-in that has two levels of scope nodes under the snap-in static node.

The following file is available for download from the Microsoft Download Center:

"MMC_ScopeNode.exe" Release Date: June-06-2001

For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

The file MMC_ScopeNode contains the following files:

File

Purpose

About.cpp

Implements ISnapinAbout

About.h

Defines class CSnapinAbout

BaseNode.h

Base class for node objects

BaseSnap.cpp

Implements COM and DLL functions

BaseSnap.h

Defines COM and DLL functions

Comp.cpp

Implementation of IComponent2

Comp.h

Defines class CComponent

Compdata.cpp

Implements IComponentData2

Compdata.h

Defines class CComponentData

DataObject.cpp

Implementation of IDataObject

DataObject.h

Defines class CDataObject

DeviceNode.cpp

Class for first-level scope nodes

DeviceNode.h

Defines class CDeviceNode

FolderNode.cpp

Class for second-level scope nodes

FolderNode.h

Defines class CFolderNode

Globals.cpp

Implementation of global functions

Globals.h

Defines variables used globally

Guids.h

Defines GUIDs used in this project

LListImpl.cpp

Implementation of a linked list

LListImpl.h

Defines class CLListImpl

Readme.txt

Useful information about this project

Registry.cpp

Implementation of registry functions

Registry.h

Defines registry functions

Resource.h

Header file for resources

ScopeNode.aps

Binary local resource file

ScopeNode.def

Defines project exports

ScopeNode.dsp

Project file for Microsoft Visual C++

ScopeNode.dsw

Workspace file for Visual C++

ScopeNode.ncb

Binary classview file

ScopeNode.opt

Binary workspace options file

ScopeNode.plg

Build log in HTML format

ScopeNode.rc

Resource template file

StaticNode.cpp

Implements class CStaticNode

StaticNode.h

Defines class CStaticNode

TraceMacro.cpp

Implements custom tracing functions

TraceMacro.h

Defines custom tracing functions

\Res\AppImg16.bmp

16x16 application bitmap

\Res\AppImg32.bmp

32x32 application bitmap

\Res\Nodes16.bmp

16x16 bitmap strip

\Res\Nodes32.bmp

32x32 bitmap strip

\Res\Snapin.ico

Application icon file

In order to build the project, expand MMC_ScopeNode and open ScopeNode.dsw in Visual C++ version 6.0 or later. This project also requires Microsoft Management Console (MMC) 2.0, which is available with Windows XP or Whistler Beta 2 or later. Also required are the MMC 2.0 header files and libraries from the Microsoft Platform SDK for Whistler Beta 2 or later, which are available from the following Microsoft Web site:

"http://www.microsoft.com/downloads"

Additional Product Features
This project includes a simple linked list class. This class is implemented in the files LListImpl.h and LListImpl.cpp. Because the MMC SDK samples do not have dependencies on Active Template Library (ATL) or Microsoft Foundation Classes, this class is included to simplify use of linked lists in SDK projects. This class is based on the MFC CList class. It has identical methods, and the MFC documentation for CList can be used for it.

Additional query words: MMC_ScopeNode MMC_Samples2

Keywords : kbfile kbDSupport

Issue type : kbinfo

Technology : kbAudDeveloper kbMMCSearch kbMMC200