Função PeerDistServerCloseStreamHandle (peerdist.h)

A função PeerDistServerCloseStreamHandle fecha um identificador retornado por PeerDistServerPublishStream.

Sintaxe

DWORD PeerDistServerCloseStreamHandle(
  [in] PEERDIST_INSTANCE_HANDLE hPeerDist,
  [in] PEERDIST_STREAM_HANDLE   hStream
);

Parâmetros

[in] hPeerDist

Um PEERDIST_INSTANCE_HANDLE retornado por PeerDistStartup.

[in] hStream

Um PEERDIST_STREAM_HANDLE retornado por PeerDistServerPublishStream.

Retornar valor

Se a função for bem-sucedida, o valor retornado será ERROR_SUCCESS. Caso contrário, a função pode retornar um dos seguintes valores:

Código de retorno Descrição
ERROR_INVALID_PARAMETER
Um ou mais parâmetros são inválidos.
ERROR_INVALID_HANDLE
O identificador hPeerDist ou hStream é inválido

Comentários

A chamada de função PeerDistServerCloseStreamHandle cancela todas as operações pendentes associadas ao hStream. Para evitar o cancelamento não intencional da publicação e do fechamento do identificador de fluxo, essa função deve ser chamada após a conclusão de PeerDistServerPublishCompleteStream.

PeerDistServerCloseStreamHandle não remove a publicação. Para remover a publicação, chame PeerDistServerUnpublish.

Requisitos

Requisito Valor
Cliente mínimo com suporte Windows 7 Professional [somente aplicativos da área de trabalho]
Servidor mínimo com suporte Windows Server 2008 R2 [somente aplicativos da área de trabalho]
Plataforma de Destino Windows
Cabeçalho peerdist.h
Biblioteca PeerDist.lib
DLL PeerDist.dll

Confira também

PeerDistServerPublishCompleteStream

PeerDistServerPublishStream

PeerDistServerUnpublish