HttpQueryServiceConfiguration function (http.h)

The HttpQueryServiceConfiguration function retrieves one or more HTTP Server API configuration records.

Syntax

HTTPAPI_LINKAGE ULONG HttpQueryServiceConfiguration(
  [in]                HANDLE                 ServiceHandle,
  [in]                HTTP_SERVICE_CONFIG_ID ConfigId,
  [in, optional]      PVOID                  pInput,
  [in, optional]      ULONG                  InputLength,
  [in, out, optional] PVOID                  pOutput,
  [in, optional]      ULONG                  OutputLength,
  [out, optional]     PULONG                 pReturnLength,
  [in]                LPOVERLAPPED           pOverlapped
);

Parameters

[in] ServiceHandle

Reserved. Must be zero.

[in] ConfigId

The configuration record query type. This parameter is one of the following values from the
HTTP_SERVICE_CONFIG_ID enumeration.

ConfigId value Meaning
HttpServiceConfigIPListenList
Queries the IP Listen List.
HttpServiceConfigSSLCertInfo
Queries the SSL store for a specific certificate record.
HttpServiceConfigUrlAclInfo
Queries URL reservation information.
HttpServiceConfigTimeout
Queries HTTP Server API wide connection timeouts.

Windows Vista and later:  This enumeration is supported.

HttpServiceConfigSslSniCertInfo
Queries the SSL Server Name Indication (SNI) store for a specific certificate record.

Windows 8 and later:  This enumeration value is supported.

HttpServiceConfigSslCcsCertInfo
Queries the SSL configuration for an SSL Centralized Certificate Store (CCS) record on the port. The port is specified by the KeyDesc member of the HTTP_SERVICE_CONFIG_SSL_CCS_QUERY structure that you pass to the pInputConfigInfo parameter.

Windows 8 and later:  This enumeration value is supported.

[in, optional] pInput

A pointer to a structure whose contents further define the query and of the type that correlates with ConfigId in the following table.

ConfigId value Meaning
HttpServiceConfigIPListenList
No input data; set to NULL.
HttpServiceConfigSSLCertInfo

HTTP_SERVICE_CONFIG_SSL_QUERY structure.

HttpServiceConfigUrlAclInfo

HTTP_SERVICE_CONFIG_URLACL_QUERY structure.

HttpServiceConfigTimeout

HTTP_SERVICE_CONFIG_TIMEOUT_KEY structure.

Windows Vista and later:  This structure is supported.

HttpServiceConfigSslSniCertInfo

HTTP_SERVICE_CONFIG_SSL_SNI_QUERY structure.

Windows 8 and later:  This structure is supported.

HttpServiceConfigSslCcsCertInfo

HTTP_SERVICE_CONFIG_SSL_CCS_QUERY structure.

Windows 8 and later:  This structure is supported.

 

For more information, see the appropriate query structures.

[in, optional] InputLength

Size, in bytes, of the pInputConfigInfo buffer.

[in, out, optional] pOutput

A pointer to a buffer in which the query results are returned. The type of this buffer correlates with ConfigId.

ConfigId value Meaning
HttpServiceConfigIPListenList

HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY structure.

HttpServiceConfigSSLCertInfo

HTTP_SERVICE_CONFIG_SSL_SET structure.

HttpServiceConfigUrlAclInfo

HTTP_SERVICE_CONFIG_URLACL_SET structure.

HttpServiceConfigTimeout

HTTP_SERVICE_CONFIG_TIMEOUT_PARAM data type.

Windows Vista and later:  This structure is supported.

HttpServiceConfigSslSniCertInfo

HTTP_SERVICE_CONFIG_SSL_SNI_SET structure.

Windows 8 and later:  This structure is supported.

HttpServiceConfigSslCcsCertInfo

HTTP_SERVICE_CONFIG_SSL_CCS_SET structure.

Windows 8 and later:  This structure is supported.

[in, optional] OutputLength

Size, in bytes, of the pOutputConfigInfo buffer.

[out, optional] pReturnLength

A pointer to a variable that receives the number of bytes to be written in the output buffer. If the output buffer is too small, the call fails with a return value of ERROR_INSUFFICIENT_BUFFER. The value pointed to by pReturnLength can be used to determine the minimum length the buffer requires for the call to succeed.

[in] pOverlapped

Reserved for asynchronous operation and must be set to 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.

Value Meaning
ERROR_INVALID_PARAMETER
One of the parameters are invalid.
ERROR_INSUFFICIENT_BUFFER
The buffer pointed to by pOutputConfigInfo is too small to receive the output data. Call the function again with a buffer at least as large as the size pointed to by pReturnLength on exit.
ERROR_MORE_DATA
This error code is only returned when ConfigId is set to HttpServiceConfigTimeout. The buffer pointed to by pOutputConfigInfo is too small to receive the output data. Call the function again with a buffer at least as large as the size pointed to by pReturnLength on exit.
ERROR_NO_MORE_ITEMS
There are no more items to return that meet the specified criteria.
Other
A system error code defined in WinError.h.

Requirements

   
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header http.h
Library Httpapi.lib
DLL Httpapi.dll

See also

HTTP Server API Version 1.0 Functions

HttpDeleteServiceConfiguration

HttpSetServiceConfiguration

HttpUpdateServiceConfiguration