HttpAddUrlToUrlGroup function

The HttpAddUrlToUrlGroup function adds the specified URL to the URL Group identified by the URL Group ID.

This function replaces the HTTP version 1.0 HttpAddUrl function.

Syntax


ULONG HttpAddUrlToUrlGroup(
  _In_       HTTP_URL_GROUP_ID UrlGroupId,
  _In_       PCWSTR            pFullyQualifiedUrl,
  _In_opt_   HTTP_URL_CONTEXT  UrlContext,
  _Reserved_ ULONG             Reserved
);

Parameters

UrlGroupId [in]

The group ID for the URL group to which requests for the specified URL are routed. The URL group is created by the HttpCreateUrlGroup function.

pFullyQualifiedUrl [in]

A pointer to a Unicode string that contains a properly formed UrlPrefix String that identifies the URL to be registered.

UrlContext [in, optional]

The context that is associated with the URL registered in this call. The URL context is returned in the HTTP_REQUEST structure with every request received on the URL specified in the pFullyQualifiedUrl parameter.

Reserved [in]

Reserved. Must be zero.

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 UrlGroupId does not exist.

The Reserved parameter is not zero.

The application does not have permission to add URLs to the Group. Only the application that created the URL Group can add URLs.

ERROR_ACCESS_DENIED

The calling process does not have permission to register the URL.

ERROR_ALREADY_EXISTS

The specified URL conflicts with an existing registration.

 

Remarks

The HTTP Server API supports existing applications using version 1.0 URL registrations, however, new development with the HTTP Server API should use HttpAddUrlToUrlGroup; HttpAddUrl should not be used.

An application can add multiple URLs to a URL group using repeated calls to HttpAddUrlToUrlGroup. Requests that match the specified URL are routed to the request queue associated with the URL group. For more information about how the HTTP Server API matches request URLs to registered URLs, see UrlPrefix Strings.

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
UrlPrefix Strings
HttpRemoveUrlFromUrlGroup
HttpCreateUrlGroup
HttpSetUrlGroupProperty
HttpQueryUrlGroupProperty
HttpCloseUrlGroup
HttpAddUrl

 

 

Show: