This document contains the
release information for the NGWS MMC Snap-in sample. You will find the following sections below:
This sample demonstrates the use of Interop and WFC
to create a MMC Snap-in. The sample implements various classic COM interfaces
in order to communicate with MMC. It uses both C# and a small C++ DLL to handle
some functions that could not be employed in C#.
It does not attempt to explain the inner workings
of MMC. Please refer to MSDN for a complete MMC discussion.
This sample list located in the MMCSnapin directory
of the NGWS SDK sample directories.
For
Example:
C:\Program
Files\NGWSSDK\Samples\MMC
In order to properly build and run this sample, the
following steps need to be performed prior to building and running the sample…
·
In order for
the sample to display help files and HTML files correctly, two variables in the
file mmcSpecificConstsAndInterfaces needs to be changed to reflect the path
they are placed in (if different from C:\Program Files\NGWSSDK\Samples\MMC)
For Example:
public class ThisSnapin
{
public
const String sDllName = “SampleMMC”;
public
const String sBaseDir = “**DIRECTORY CONTAINING HTML FILES**”;
public
const String sHelpFile = “**DIRECTORY CONTAINING HELP FILE**\\snapsamp.chm”;
}
·
Type NMAKE
from the command line to build the binary
For Example:
C:\Program Files\NGWSSDK\Samples\MMC\:>NMAKE
·
Type NMAKE
reg from the command line to register the COM objects and snap-in
For Example:
C:\Program Files\NGWSSDK\Samples\MMC\:>NMAKE
reg
·
Place SampleMMCHelper.dll
in a directory included in the PATH environment variable
For example:
path=%path%;C:\Program
Files\NGWSSDK\Samples\MMC
·
Both SampleMMCHelper.dll
and SampleMMC.res are pre-built. The source and resource files are
provided, but they will require an installation of Visual C++ in order to
compile them
In order to run this sample, follow the
instructions listed below.
For Example:
C:\Program
Files\NGWSSDK\Samples\MMC\:>mmc
·
Select Add/Remove
Snap-in from the Console Menu
·
Click Add
·
Select the “#1 Team
Sites” snap-in
·
Click Add
·
Click Close
·
Click Ok