PeerDistServerPublishAddToStream function (peerdist.h)
The PeerDistServerPublishAddToStream function adds data to the publishing stream.
Syntax
DWORD PeerDistServerPublishAddToStream(
[in] PEERDIST_INSTANCE_HANDLE hPeerDist,
[in] PEERDIST_STREAM_HANDLE hStream,
[in] DWORD cbNumberOfBytes,
[in] PBYTE pBuffer,
[in] LPOVERLAPPED lpOverlapped
);
Parameters
[in] hPeerDist
A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.
[in] hStream
A PEERDIST_STREAM_HANDLE created by PeerDistServerPublishStream.
[in] cbNumberOfBytes
Number of bytes to be published.
[in] pBuffer
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.
[in] lpOverlapped
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 code | Description |
---|---|
|
One or more parameters are invalid. |
|
The hPeerDist or hStream handle is invalid. |
|
The operation was canceled. |
|
The feature is disabled by Group Policy. |
|
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
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 |