HttpRemoveUrlFromUrlGroup function

The HttpRemoveUrlFromUrlGroup function removes the specified URL from the group identified by the URL Group ID. This function removes one, or all, of the URLs from the group.

This function replaces the HTTP version 1.0 HttpRemoveUrl function.

Syntax


ULONG HttpRemoveUrlFromUrlGroup(
  _In_ HTTP_URL_GROUP_ID UrlGroupId,
  _In_ PCWSTR            pFullyQualifiedUrl,
  _In_ ULONG             Flags
);

Parameters

UrlGroupId [in]

The ID of the URL group from which the URL specified in pFullyQualifiedUrl is removed.

pFullyQualifiedUrl [in]

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

When HTTP_URL_FLAG_REMOVE_ALL is passed in the Flags parameter, all of the existing URL registrations for the URL Group identified in UrlGroupId are removed from the group. In this case, pFullyQualifiedUrl must be NULL.

Flags [in]

The URL flags qualifying the URL that is removed. This can be one of the following flags:

URL FlagMeaning
HTTP_URL_FLAG_REMOVE_ALL

Removes all of the URLs currently registered with the URL Group.

 

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

The Flags parameter contains an invalid combination of flags.

The HTTP_URL_FLAG_REMOVE_ALL flag was set and the pFullyQualifiedUrl parameter was not set to NULL.

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

ERROR_ACCESS_DENIED

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

ERROR_FILE_NOT_FOUND

The specified URL is not registered with the URL Group.

 

Remarks

The HTTP Server API supports existing applications using the version 1.0 URL registrations, however, new development with the HTTP Server API should use HttpRemoveUrlFromUrlGroup; do not use HttpRemoveUrl.

Applications should remove the URL added to the group by HttpAddUrlToUrlGroup, when the URL is no longer required.

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
HttpAddUrlToUrlGroup
HttpCreateUrlGroup
HttpCloseUrlGroup
HttpSetUrlGroupProperty
HttpQueryUrlGroupProperty
HttpRemoveUrl

 

 

Show: