Hosting Managed NGWS Components in Unmanaged C++

This document contains the release information for the Hosting Managed NGWS Components in Unmanaged C++ sample.  You will find the following sections below:

 

Sample Overview

This sample demonstrates how to load NGWS assemblies into application domains. The sample can use both assemblies containing explicit manifests and existing dll's that do not contain manifests.  However, the level of functionality offered by the sample is different depending on whether the code you are referencing is described by a manifest or not. 

Requirements:

This sample requires the installation of Visual C++ 6.0 in order to function properly.

 

Location of the Sample

This sample list located in the Assemblies\Corhost directory of the NGWS SDK sample directories.

For Example:

C:\Program Files\NGWSSDK\Samples\Assemblies\Corhost

 

Building the Sample

In order to properly build and run this sample, the following steps need to be performed prior to building and running the sample.

·         Type REGASM MSCORLIB.DLL from the command line.

For Example:

C:\Program Files\NGWSSDK\Samples\Assemblies\Corhost\:>REGASM<$SystemRoot>\COMPlus\(Intstall Dir)\MSCORLIB.DLL

·         Add the NGWS SDK Include directory to the Visual C++ 6.0 development environment.

a.    Select Options under the Tools Menu.

b.    Select the Directories tab

c.    Click on the first empty text area, and type the path to the NGWS SDK include directory.  Or click the browse button and browse to the NGWS SDK include directory.

Typically:

C:\Program Files\NGWSSDK\Include

and

<$SystemRoot>\COMPlus\(Intstall Dir)

·         Open the CorHost development project CORHOST.DSW in the Visual C++ 6.0 development environment.

·         Press F7 or Choose Build CorHost.exe from the Build Menu

 

 

Running the Sample

In order to run this sample, follow the instructions listed below.

For Example:

C:\Program Files\NGWSSDK\Samples\Assemblies\Corhost\Debug\:>Corhost