HttpSetServiceConfiguration Function

The HttpSetServiceConfiguration function creates and sets a configuration record for the HTTP Server API configuration store. The call fails if the specified record already exists. To change a given configuration record, delete it and then recreate it with a different value.

Syntax

C++
ULONG HttpSetServiceConfiguration(
  __in  HANDLE ServiceHandle,
  __in  HTTP_SERVICE_CONFIG_ID ConfigId,
  __in  PVOID pConfigInformation,
  __in  ULONG ConfigInformationLength,
  __in  LPOVERLAPPED pOverlapped
);

Parameters

ServiceHandle [in]

Reserved. Must be zero.

ConfigId [in]

Type of configuration record to be set. This parameter can be one of the following values from the HTTP_SERVICE_CONFIG_ID enumeration.

ConfigId valueMeaning
HttpServiceConfigIPListenList

Sets a record in the IP Listen List.

HttpServiceConfigSSLCertInfo

Sets a specified SSL Certificate record.

HttpServiceConfigUrlAclInfo

Sets a URL reservation record.

HttpServiceConfigTimeout

Sets a specified HTTP Server API wide connection time-out.

Windows Server 2003 with SP1 and Windows XP with SP2:  This enumeration value is not supported.

 

pConfigInformation [in]

A pointer to a buffer that contains the appropriate data to specify the type of record to be set.

ConfigId valueMeaning
HttpServiceConfigIPListenList

HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure.

HttpServiceConfigSSLCertInfo

HTTP_SERVICE_CONFIG_SSL_SET structure.

HttpServiceConfigUrlAclInfo

HTTP_SERVICE_CONFIG_URLACL_SET structure.

HttpServiceConfigTimeout

HTTP_SERVICE_CONFIG_TIMEOUT_SET structure.

Windows Server 2003 with SP1 and Windows XP with SP2:  This structure is not supported.

 

ConfigInformationLength [in]

Size, in bytes, of the pConfigInformation buffer.

pOverlapped [in]

This parameter is reserved and must be NULL.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

ValueMeaning
ERROR_ALREADY_EXISTS

The specified record already exists, and must be deleted in order for its value to be re-set.

ERROR_INSUFFICIENT_BUFFER

The buffer size specified in the ConfigInformationLength parameter is insufficient.

ERROR_INVALID_HANDLE

The ServiceHandle parameter is invalid.

ERROR_INVALID_PARAMETER

One or more of the supplied parameters is in an unusable form.

ERROR_NO_SUCH_LOGON_SESSION

The SSL Certificate used is invalid. This can occur only if the HttpServiceConfigSSLCertInfo parameter is used.

Other

A system error code defined in WinError.h.

 

Remarks

Note  The configuration parameters set with HttpSetServiceConfiguration are applied to all the HTTP Server API applications on the machine, and persist when the HTTP Server API shuts down, or when the computer is restarted.

Requirements

Minimum supported clientWindows Vista, Windows XP with SP2
Minimum supported serverWindows Server 2003
HeaderHttp.h
LibraryHttpapi.lib
DLLHttpapi.dll

See Also

HTTP Server API Version 1.0 Functions
HttpQueryServiceConfiguration
HttpDeleteServiceConfiguration

Send comments about this topic to Microsoft

Build date: 7/23/2009

Tags :


Page view tracker