PeerDistServerPublishCompleteStream function (peerdist.h)

The PeerDistServerPublishCompleteStream function completes the process of adding data to the stream.

Syntax

DWORD PeerDistServerPublishCompleteStream(
  [in] PEERDIST_INSTANCE_HANDLE hPeerDist,
  [in] PEERDIST_STREAM_HANDLE   hStream,
  [in] LPOVERLAPPED             lpOverlapped
);

Parameters

[in] hPeerDist

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

[in] hStream

A PEERDIST_STREAM_HANDLE returned by PeerDistServerPublishStream.

[in] lpOverlapped

Pointer to an OVERLAPPED structure. The Offset and OffsetHigh are reserved and must be zero.

Return value

If the function succeeds, the return value is ERROR_IO_PENDING. 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 or hStream handle is invalid
ERROR_OPERATION_ABORTED
The operation was canceled.
ERROR_ACCESS_DISABLED_BY_POLICY
The feature is disabled by Group Policy.
PEERDIST_ERROR_SERVICE_UNAVAILABLE
The service is unavailable.

Remarks

Once this API completes successfully, PeerDistServerOpenContentInformation and PeerDistServerRetrieveContentInformation can be used to retrieve content information.

PeerDistServerPublishCompleteStream does not close hStream. In order to close hStream, call PeerDistServerCloseStreamHandle.

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

PeerDistServerCloseStreamHandle

PeerDistServerOpenContentInformation

PeerDistServerPublishAddToStream

PeerDistServerPublishStream

PeerDistServerRetrieveContentInformation

PeerDistServerUnpublish