Custom Internet Security Manager Examples

 

This topic describes the code examples this section and explains how to create and build the corresponding Visual Studio projects.

MSXML Projects

A Visual Studio C++ project can be created for each of the subsequent sample topics. These projects are described in the following table. The project names were selected to match the primary source file base name, but this is not a requirement.

Project name Description
DOMWithoutSiteObj Implements an XML DOM document that does not contain a site object. Because of this, the default Internet Security Manager Module is used to control access to resources, here the local file Sample.xml.
DOMWithSiteObj Implements an XML DOM document that contains a site object (a custom Internet security manager component) that controls access to resources, here the local file Sample.xml.

Creating and Building the Projects

The following steps should be applied individually to code provided in each of the subsequent topics. For simplicity, these applications are designed as Win32 console applications.

To create the project and add the source and header files to the project
  1. Create the project and add new, empty source and header files to it. For detailed instructions on how to add files to the project, see Set Up My Visual C++ Project.

  2. Name the new files according to the file names listed in the resource listing in their respective topic.

  3. Copy the C/C++ source code from the topic and paste it into the newly created source files.

To add an XML file to the project
  1. Create sample.xml in the same folder where the .exe file will be located. (This XML file is the same for both projects.)

  2. Copy the resource listing from the topic and paste it into the source file you have just created.

At this point, the Visual Studio project should be complete. It can now be built by choosing the Build Solution command from the Build menu or by pressing Ctrl+Shift+B.

In This Section

This section contains the following samples:

See Also

Set Up My Visual C++ Project
Using a Custom Internet Security Manager with MSXML
DOM Document without a Site Object (C++ Code Listing)
DOM Document with a Site Object (C++ Code Listing)