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.
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.
|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
|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
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
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.
Name the new files according to the file names listed in the resource listing in their respective topic.
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
sample.xmlin the same folder where the .exe file will be located. (This XML file is the same for both projects.)
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: