Partager via


IISMimeType Interface

The IISMimeType interface contains methods that can get and set a file name extension and MIME type. This interface allows you to create a special purpose object in ADSI that can configure the MimeMap metabase property in IIS. This interface can be queried from an IISMimeMap object.

This interface can be used from a C++ or Visual Basic application that uses ADSI. The required header file, IIIS.h, is installed with Visual Studio and the IIS Software Developer Kit. Visual Basic developers can treat these methods as properties if they remove the "get_" and "set_" from the member name.

For a C++ code example that uses ADSI to configure the metabase, see Using ADSI to Configure IIS in a C++ Application.

Methods in Vtable Order

The IISMimeType interface exposes the following methods.

Method

Description

get_MimeType

Gets a BSTR value indicating the MIME type, for example, "text/xml".

put_MimeType

Sets the BSTR value indicating the MIME type, for example, "text/xml". Also use put_Extension to set the file name extension that is mapped to this MIME type.

get_Extension

Gets a BSTR value indicating the file name extension, for example, ".xml".

put_Extension

Sets the BSTR value indicating the file name extension, for example, ".xml". Also use put_MimeType to set the MIME type that is mapped to this file name extension.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Header: Declared in iiis.h.

See Also

Concepts

IIS ADSI Provider Interfaces

Using ADSI to Configure IIS in a C++ Application

IIS Constants and Header Files