Built-in Object Interfaces for C++

Active Server Pages implements interfaces that enable your component to access the properties and methods of the ASP built-in objects. The IScriptingContext interface contains methods that return pointers to the built-in object interfaces. Your component can then use these object interfaces to access the properties and methods of the built-in objects, or interfaces to the Request and Response object collections.

The following table lists the built-in object interfaces:

Interface

Use to

IScriptingContext

Return a pointer to an interface on one of the built-in objects: IApplicationObject, IRequest, IResponse, IServer, or ISessionObject.

IApplicationObject

Call the methods and properties of the Application object.

IRequest

Call the methods and properties of the Request object.

IResponse

Call the methods and properties of the Response object.

IServer

Call the methods and properties of the Server object.

ISessionObject

Call the methods and properties of the Session object.

IReadCookie

Retrieve the values stored in the read-only Cookies collection.

IRequestDictionary

Index the subcollections of the IRequest interface. It is also used to retrieve the individual values stored in the ClientCertificate collection..

IStringList

Retrieve the values stored in a string list, such as that in the QueryString, Form, or ServerVariables collections.

IWriteCookie

Set the values and attributes of a cookie stored in the write-only Cookies collection.

To use the IScriptingContext and object interfaces in a C++ component, you must include the header file Asptlb.h as shown in the following code. This file is installed with the Active Server Pages feature in the directory \Inetsrv\Asp\Cmpnts\.

#include "asptlb.h"
 

To create a component that uses the ActiveX™ Template Library (ATL) 1.1, you should install ATL on your machine and then select "ATL COM Appwizard" when creating a new project workspace in Microsoft® Visual C++®.

For more information about the built-in objects, see the Object Reference.


© Microsoft Corporation. All rights reserved.