PeerDistServerUnpublish function (peerdist.h)

The PeerDistServerUnpublish function removes a publication created via PeerDistServerPublishStream.

Syntax

DWORD PeerDistServerUnpublish(
  [in] PEERDIST_INSTANCE_HANDLE hPeerDist,
       DWORD                    cbContentIdentifier,
  [in] PBYTE                    pContentIdentifier
);

Parameters

[in] hPeerDist

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

cbContentIdentifier

The length, in bytes, of the content identifier.

[in] pContentIdentifier

Pointer to a buffer that contains the content identifier.

Return value

If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function may return one of the following values:

Return code Description
ERROR_INVALID_PARAMETER
One or more parameters are invalid.
ERROR_INVALID_HANDLE
The hPeerDist handle is invalid.
ERROR_ACCESS_DISABLED_BY_POLICY
The feature is disabled by Group Policy.
PEERDIST_ERROR_SERVICE_UNAVAILABLE
The service is unavailable.

Remarks

The PeerDistServerUnpublish function cancels all pending operations on unpublished content within the Peer Distribution session that is associated with the specified hPeerDist. The client is still required to close previously opened handles on that content with a call to PeerDistClientCloseContent.

A publication is accessible only to the User Account that originally published the content.

Requirements

Requirement Value
Minimum supported client Windows 7 Professional [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header peerdist.h
Library PeerDist.lib
DLL PeerDist.dll

See also

PeerDistServerPublishStream