C++ Interfaces

ASP implements interfaces that enable your component to access the properties and methods of the ASP built-in objects. You should use the IObjectContext interface to access the built-in object interfaces. Your component can then use the built-in object interfaces to access the properties, methods, and collections of the built-in objects. For more information, see IObjectContext in the COM section.

The following table lists the built-in object interfaces.

Interface Description
IApplicationObject Calls the methods and properties of the Application object.
IASPError Provides access to the read-only properties describing the last error event.
IReadCookie Retrieves the values stored in the read-only Cookies collection.
IRequest Calls the methods and properties of the Request object.
IRequestDictionary Indexes the subcollections of the IRequest interface. You can also use it to retrieve the individual values stored in the ClientCertificate collection.
IResponse Calls the methods and properties of the Response object.
IScriptingContext (Obsolete) Returns a pointer to an interface on one of the built-in objects: IApplicationObject, IRequest, IResponse, IServer, or ISessionObject.
IServer Calls the methods and properties of the Server object.
ISessionObject Calls the methods and properties of the Session object.
IStringList Retrieves the values stored in a string list, such as that in the QueryString, Form, or ServerVariables collections.
IVariantDictionary Retrieves the items stored in the Application and Session Contents and StaticObjects collections.
IWriteCookie Sets 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:

#include "asptlb.h"
 

IIS installs the Asptlb.h file in the \iissamples\sdk\include directory.

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

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