Export (0) Print
Expand All

IIS Constants and Header Files

IIS 6.0

This topic describes the header files that are required by the programmatic administration interfaces, and any constants defined in them.

When creating applications that configure IIS, you might need to include the following header files or make use of some of the constants that are defined in the header files.

Programmatic administration scripts can also make use of some of the constants defined in these header files, even though the constants will need to be declared within the scripts.

The following header files are provided by IIS.

Iadmw.h

The Iadmw.h header file contains definitions for the members of the IIS Admin Base Object Interfaces. Additionally, the following constant is defined.

#define     ADMINDATA_MAX_NAME_LEN       256

Iiisext.h

The Iiisext.h header file contains definitions for the IIS admin objects and must be included in C++ applications that configure IIS by using the IIS ADSI Provider Interfaces because ADSI uses early binding. Also include the IISext_i.c file that contains GUIDs required by the Iiisext.h header file. You will avoid linker errors if you use this file. Also include the IIIS.h header file if you need to work with the IISMimeType and IISIPSecurity objects.

IIIS.h

The IIIS.h header file contains definitions for special purpose IIS admin objects that are not included in the Iiisext.h header file, such as the IISMimeType and IISIPSecurity objects. The IIIS.h header file must be included in C++ applications that configure IIS by using ADSI. This occurs because ADSI uses early binding. Also include the Iiisext.h header file and the IISext_i.c file.

IIScnfg.h

The IIScnfg.h header file contains definitions for the friendly identifiers of all the metabase properties and the friendly bitmask identifiers of property flags. Friendly identifiers and bitmask identifiers are described in Using the Metabase Reference Pages. For example, the following constants can be used when configuring metabase properties by using the IIS Admin Base Object Interfaces or the IIS ADSI Provider Interfaces in a C++ application.

#define     IIS_MD_FILE_PROP_BASE        6000
#define     MD_ACCESS_PERM               (IIS_MD_FILE_PROP_BASE+16 )
#define     MD_ACCESS_EXECUTE            0x00000004
#define     MD_ACCESS_MAP_CERT           0x00000080
#define     MD_ACCESS_MASK               0x0000ffff
#define     MD_ACCESS_NEGO_CERT          0x00000020
#define     MD_ACCESS_NO_PHYSICAL_DIR    0x00008000
#define     MD_ACCESS_NO_REMOTE_EXECUTE  0x00002000
#define     MD_ACCESS_NO_REMOTE_READ     0x00001000
#define     MD_ACCESS_NO_REMOTE_SCRIPT   0x00004000
#define     MD_ACCESS_NO_REMOTE_WRITE    0x00000400
#define     MD_ACCESS_READ               0x00000001
#define     MD_ACCESS_REQUIRE_CERT       0x00000040
#define     MD_ACCESS_SCRIPT             0x00000200
#define     MD_ACCESS_SOURCE             0x00000010
#define     MD_ACCESS_SSL                0x00000008
#define     MD_ACCESS_SSL128             0x00000100
#define     MD_ACCESS_WRITE              0x00000002

Additionally, the IIScnfg.h header file contains definitions for some constants that are used with metabase properties. For example, the following constants can be used with the ServerState property.

#define     MD_SERVER_STATE_CONTINUING   7
#define     MD_SERVER_STATE_PAUSED       6
#define     MD_SERVER_STATE_PAUSING      5
#define     MD_SERVER_STATE_STARTED      2
#define     MD_SERVER_STATE_STARTING     1
#define     MD_SERVER_STATE_STOPPED      4
#define     MD_SERVER_STATE_STOPPING     3

Iisrsta.h

The Iisrsta.h header file contains definitions for the members of the IIisServiceControl Interface interface.

Iwamreg.h

The Iwamreg.h header file contains definitions for the members of the IIISApplicationAdmin Interface, IWamAdmin Interface, and IWamAdmin2 Interface interfaces. Additionally, the following constants are defined.

#define      APPSTATUS_RUNNING           2
#define      APPSTATUS_STOPPED           3
#define      APPSTATUS_UNLOADED          1 

Ilogobj.Hxx

The Ilogobj.Hxx header file contains definitions for the members of the IIS Custom Logging Module Interfaces interfaces.

Mddefw.h

The Mddefw.h header file contains definitions for macros, metadata types, attributes, and structures that are used when configuring IIS by using the IIS Admin Base Object Interfaces. The following constants are defined.

#define     MD_BACKUP_FORCE_BACKUP       0x00000004
#define     MD_BACKUP_HIGHEST_VERSION    0xfffffffe
#define     MD_BACKUP_MAX_LEN            100
#define     MD_BACKUP_MAX_VERSION        9999
#define     MD_BACKUP_NEXT_VERSION       0xffffffff
#define     MD_BACKUP_OVERWRITE          0x00000001
#define     MD_BACKUP_SAVE_FIRST         0x00000002
#define     MD_CHANGE_TYPE_ADD_OBJECT    0x00000002
#define     MD_CHANGE_TYPE_DELETE_DATA   0x00000008
#define     MD_CHANGE_TYPE_DELETE_OBJECT 0x00000001
#define     MD_CHANGE_TYPE_RENAME_OBJECT 0x00000010
#define     MD_CHANGE_TYPE_SET_DATA      0x00000004
#define     MD_DEFAULT_BACKUP_LOCATION   TEXT("MDBackUp")
#define     MD_EXPORT_INHERITED          0x00000001
#define     MD_EXPORT_NODE_ONLY          0x00000002
#define     MD_HISTORY_LATEST            0x00000001
#define     MD_IMPORT_INHERITED          0x00000001
#define     MD_IMPORT_MERGE              0x00000004
#define     MD_IMPORT_NODE_ONLY          0x00000002
#define     MD_MAX_CHANGE_ENTRIES        100
#define     METADATA_INHERIT             0x00000001
#define     METADATA_INSERT_PATH         0x00000040
#define     METADATA_ISINHERITED         0x00000020
#define     METADATA_LOCAL_MACHINE_ONLY  0x00000080
#define     METADATA_MASTER_ROOT_HANDLE  0
#define     METADATA_MAX_NAME_LEN        256
#define     METADATA_NO_ATTRIBUTES       0
#define     METADATA_NON_SECURE_ONLY     0x00000100
#define     METADATA_PARTIAL_PATH        0x00000002
#define     METADATA_PERMISSION_READ     0x00000001
#define     METADATA_PERMISSION_WRITE    0x00000002
#define     METADATA_REFERENCE           0x00000008
#define     METADATA_SECURE              0x00000004
#define     METADATA_VOLATILE            0x00000010

Mdmsg.h

The Mdmsg.h header file contains definitions for error and warning messages that can occur when configuring IIS by using the IIS Admin Base Object Interfaces, the IIS ADSI Provider, or the IIS WMI Provider. For definitions of the messages, see IMSAdminBase Errors. The following constants are defined.

#define     MD_ERROR_CANNOT_REMOVE_SECURE_ATTRIBUTE  0x800CC808L
#define     MD_ERROR_DATA_NOT_FOUND                  0x800CC801L
#define     MD_ERROR_IISAO_INVALID_SCHEMA            0x800CC810L
#define     MD_ERROR_INVALID_VERSION                 0x800CC802L
#define     MD_ERROR_NO_SESSION_KEY                  0x800CC81DL
#define     MD_ERROR_NOT_INITIALIZED                 0x800CC800L
#define     MD_ERROR_READ_METABASE_FILE              0x800CC819L
#define     MD_ERROR_SECURE_CHANNEL_FAILURE          0x800CC806L
#define     MD_WARNING_DUP_NAME                      0x000CC804L
#define     MD_WARNING_INVALID_DATA                  0x000CC805L
#define     MD_WARNING_PATH_NOT_FOUND                0x000CC803L
#define     MD_WARNING_PATH_NOT_INSERTED             0x000CC807L
#define     MD_WARNING_SAVE_FAILED                   0x000CC809L

The following header files are also useful when creating applications or scripts that configure IIS.

AdsErr.h

The AdsErr.h header file contains definitions for ADSI error messages. For more information, see Generic ADSI Error Codes or Code Examples for Working with ADSI Error Messages. This header file is provided by ADSI.

#define    E_ADS_BAD_PARAMETER           _HRESULT_TYPEDEF_(0x80005008L)
#define    E_ADS_BAD_PATHNAME            _HRESULT_TYPEDEF_(0x80005000L)
#define    E_ADS_CANT_CONVERT_DATATYPE   _HRESULT_TYPEDEF_(0x8000500CL)
#define    E_ADS_COLUMN_NOT_SET          _HRESULT_TYPEDEF_(0x80005010L)
#define    E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003L)
#define    E_ADS_INVALID_DOMAIN_OBJECT   _HRESULT_TYPEDEF_(0x80005001L)
#define    E_ADS_INVALID_FILTER          _HRESULT_TYPEDEF_(0x80005014L)
#define    E_ADS_INVALID_USER_OBJECT     _HRESULT_TYPEDEF_(0x80005002L)
#define    E_ADS_OBJECT_EXISTS           _HRESULT_TYPEDEF_(0x8000500EL)
#define    E_ADS_OBJECT_UNBOUND          _HRESULT_TYPEDEF_(0x80005009L)
#define    E_ADS_PROPERTY_INVALID        _HRESULT_TYPEDEF_(0x80005007L)
#define    E_ADS_PROPERTY_MODIFIED       _HRESULT_TYPEDEF_(0x8000500BL)
#define    E_ADS_PROPERTY_NOT_FOUND      _HRESULT_TYPEDEF_(0x8000500DL)
#define    E_ADS_PROPERTY_NOT_MODIFIED   _HRESULT_TYPEDEF_(0x8000500AL)
#define    E_ADS_PROPERTY_NOT_SET        _HRESULT_TYPEDEF_(0x80005005L)
#define    E_ADS_PROPERTY_NOT_SUPPORTED  _HRESULT_TYPEDEF_(0x80005006L)
#define    E_ADS_SCHEMA_VIOLATION        _HRESULT_TYPEDEF_(0x8000500FL)
#define    E_ADS_UNKNOWN_OBJECT          _HRESULT_TYPEDEF_(0x80005004L)
#define    S_ADS_ERRORSOCCURRED          _HRESULT_TYPEDEF_(0x00005011L)
#define    S_ADS_NOMORE_COLUMNS          _HRESULT_TYPEDEF_(0x00005013L)
#define    S_ADS_NOMORE_ROWS             _HRESULT_TYPEDEF_(0x00005012L)

Iads.h

The Iads.h header file contains definitions for ADSI constants. For more information, see ADSI Constants. This header file is provided by ADSI.

#define     ADS_ATTR_APPEND              3
#define     ADS_ATTR_CLEAR               1
#define     ADS_ATTR_DELETE              4
#define     ADS_ATTR_UPDATE              2
#define     ADS_EXT_INITCREDENTIALS      1
#define     ADS_EXT_INITIALIZE_COMPLETE  2
#define     ADS_EXT_MAXEXTDISPID         16777215
#define     ADS_EXT_MINEXTDISPID         1

WbemCli.h

The WbenCli header file contains definitions for the Windows WMI interfaces. Include this file when creating applications that use WMI.

Show:
© 2014 Microsoft