Share via


IISWebService::AddExtensionFile

The AddExtensionFile method adds a new ISAPI extension or CGI application to the IIS server by adding a corresponding entry to the WebSvcExtRestrictionList metabase property.

Note

This method is only available on IIS 6.0 or later versions.

HRESULT AddExtensionFile(
  BSTR  bstrExtensionFile,
  VARIANT  bAccess,
  BSTR  bstrGroupID,
  VARIANT  bCanDelete,
  BSTR  bstrDescription
);

Parameters

  • bstrExtensionFile
    [in] String that contains the file to add. This is the second token, ExtensionPath, in the WebSvcExtRestrictionList metabase property.

  • bAccess
    [in] VARIANT_BOOL that contains VARIANT_TRUE (-1) if the extension is enabled, VARIANT_FALSE (0) if it is disabled. This is the first token, AllowDenyFlag, in the WebSvcExtRestrictionList metabase property.

  • bstrGroupID
    [in] String that contains the group name. This is the fourth token, GroupID, in the WebSvcExtRestrictionList metabase property.

  • bCanDelete
    [in] VARIANT_BOOL that contains VARIANT_TRUE (-1) if the extension can be deleted in IIS Manager, otherwise VARIANT_FALSE (0). This is the third token, UIDeletableFlag, in the WebSvcExtRestrictionList metabase property.

  • bstrDescription
    [in] String that contains the friendly name or a short description of the extension. This is the fifth token, ApplicationName, in the WebSvcExtRestrictionList metabase property.

Return Value

The method returns an HRESULT. Possible values include, but are not limited to, S_OK, which indicates that the method succeeded.

Requirements

Server: Requires Windows Server 2003.

Product: IIS

Header: Declared in iiisext.h; include iisext_i.c.

See Also

Concepts

IIS ADSI Provider Interfaces

Using ADSI to Configure IIS in a C++ Application

IIS Constants and Header Files

WebSvcExtRestrictionList

ApplicationDependencies

Adding Web Service Extensions to the Restriction List

Installing and Uninstalling CGI and ISAPI Extensions