PeerDistServerCloseStreamHandle function

The PeerDistServerCloseStreamHandle function closes a handle returned by PeerDistServerPublishStream.

Syntax


DWORD WINAPI PeerDistServerCloseStreamHandle(
  _In_ PEERDIST_INSTANCE_HANDLE hPeerDist,
  _In_ PEERDIST_STREAM_HANDLE   hStream
);

Parameters

hPeerDist [in]

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

hStream [in]

A PEERDIST_STREAM_HANDLE returned by PeerDistServerPublishStream.

Return value

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

Return codeDescription
ERROR_INVALID_PARAMETER

One or more parameters are invalid.

ERROR_INVALID_HANDLE

The hPeerDist or hStream handle is invalid

 

Remarks

The PeerDistServerCloseStreamHandle function call cancels all pending operations associated with hStream. To prevent unintended cancellation of publication and closure of the stream handle, this function should be called after the completion of PeerDistServerPublishCompleteStream.

PeerDistServerCloseStreamHandle does not remove the publication. In order to remove the publication, call PeerDistServerUnpublish.

Requirements

Minimum supported client

Windows 7 Professional [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

PeerDist.h

Library

PeerDist.lib

DLL

PeerDist.dll

See also

PeerDistServerPublishStream
PeerDistServerPublishCompleteStream
PeerDistServerUnpublish

 

 

Community Additions

ADD
Show: