Windows Dev Center

PeerDistServerPublishAddToStream function

The PeerDistServerPublishAddToStream function adds data to the publishing stream.

Syntax


DWORD WINAPI PeerDistServerPublishAddToStream(
  _In_ PEERDIST_INSTANCE_HANDLE hPeerDist,
  _In_ PEERDIST_STREAM_HANDLE   hStream,
  _In_ DWORD                    cbNumberOfBytes,
  _In_ PBYTE                    pBuffer[bcount(cbNumberOfBytes)],
  _In_ LPOVERLAPPED             lpOverlapped
);

Parameters

hPeerDist [in]

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

hStream [in]

A PEERDIST_STREAM_HANDLE created by PeerDistServerPublishStream.

cbNumberOfBytes [in]

Number of bytes to be published.

pBuffer [in]

Pointer to the buffer that contains the data to be published. This buffer must remain valid for the duration of the add operation. The caller must not use this buffer until the add operation is completed.

lpOverlapped [in]

Pointer to an OVERLAPPED structure. The Offset and OffsetHigh members 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 codeDescription
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

When calling this function multiple times on a single stream handle, the caller must wait for each operation to complete before the next call is made.

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

PeerDistStartup
PeerDistServerPublishStream

 

 

Community Additions

ADD
Show:
© 2015 Microsoft