HttpQueryServerSessionProperty function

The HttpQueryServerSessionProperty function queries a server property on the specified server session.

Syntax


ULONG HttpQueryServerSessionProperty(
  _In_       HTTP_SERVER_SESSION_ID ServerSessionId,
  _In_       HTTP_SERVER_PROPERTY Property,
  _Out_      PVOID pPropertyInformation,
  _In_       ULONG PropertyInformationLength,
  _Out_opt_  PULONG pReturnLength
);

Parameters

ServerSessionId [in]

The server session for which the property setting is returned.

Property [in]

A member of the HTTP_SERVER_PROPERTY enumeration that describes the property type that is queried. This can be one of the following.

PropertyMeaning
HttpServerStateProperty

Queries the current state of the server session.

HttpServerTimeoutsProperty

Queries the server session connection timeout limits.

HttpServerQosProperty

Queries the bandwidth throttling for the server session. By default, the HTTP Server API does not limit bandwidth.

HttpServerAuthenticationProperty

Queries kernel mode server-side authentication for the Basic, NTLM, Negotiate, and Digest authentication schemes.

HttpServerChannelBindProperty

Queries the channel binding token (CBT) properties.

 

pPropertyInformation [out]

A pointer to the buffer that receives the property data.

pPropertyInformation points to one of the following property data structures based on the property that is set.

PropertyStructure
HttpServerStateProperty HTTP_STATE_INFO
HttpServerQosProperty HTTP_QOS_SETTING_INFO
HttpServerTimeoutsProperty HTTP_TIMEOUT_LIMIT_INFO
HttpServerAuthenticationProperty HTTP_SERVER_AUTHENTICATION_INFO
HttpServerChannelBindProperty HTTP_CHANNEL_BIND_INFO

 

PropertyInformationLength [in]

The length, in bytes, of the buffer pointed to by the pPropertyInformation parameter.

pReturnLength [out, optional]

The number, in bytes, returned in the pPropertyInformation buffer.

If the output buffer is too small, the call fails with a return value of ERROR_MORE_DATA. The value pointed to by pReturnLength can be used to determine the minimum length of the buffer required for the call to succeed.

Return value

If the function succeeds, it returns NO_ERROR

If the function fails, it returns one of the following error codes.

ValueMeaning
ERROR_INVALID_PARAMETER

The property type specified in the Property parameter is not supported for server sessions.

The ServerSessionId parameter does not contain a valid server session.

The pPropertyInformation parameter is NULL.

The PropertyInformationLength parameter is zero.

The application does not have permission to query the server session properties. Only the application that created the server session can query the properties.

ERROR_MORE_DATA

The size, in bytes, of the buffer pointed to by the pPropertyInformation parameter is too small to receive the property data. On exit call the function again with a buffer at least as large as the size pointed to by pReturnLength on exit.

 

Remarks

Querying the HttpServerLoggingProperty is not supported.

The pPropertyInformation parameter points to the configuration structure for the property type that is queried. The PropertyInformationLength parameter specifies the size, in bytes, of the configuration structure. For example, when querying the HttpServerTimeoutsProperty the pPropertyInformation parameter must point to a buffer that is at least the size of the HTTP_TIMEOUT_LIMIT_INFO structure.

To specify the HttpServerQosProperty property in the pPropertyInformation parameter, set QosType to HttpQosSettingTypeBandwidth inside the HTTP_QOS_SETTING_INFO structure, and pass a pointer to this structure in the parameter.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 2.0 Functions
HttpCreateServerSession
HttpSetServerSessionProperty
HttpQueryServerSessionProperty
HttpCloseServerSession

 

 

Community Additions

ADD
Show:
© 2015 Microsoft