Skip to content

Latest commit

 

History

History
148 lines (115 loc) · 4.51 KB

nf-peerdist-peerdistclientadddata.md

File metadata and controls

148 lines (115 loc) · 4.51 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:peerdist.PeerDistClientAddData
PeerDistClientAddData function (peerdist.h)
The PeerDistClientAddData function is used to supply content to the local cache.
PeerDistClientAddData
PeerDistClientAddData function [Peer Networking]
p2p.peerdistclientadddata
peerdist/PeerDistClientAddData
p2p\peerdistclientadddata.htm
p2p
f1fdd398-ed84-4819-b0e8-e9b653bd6848
12/05/2018
PeerDistClientAddData, PeerDistClientAddData function [Peer Networking], p2p.peerdistclientadddata, peerdist/PeerDistClientAddData
peerdist.h
Windows
Windows 7 Professional [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
PeerDist.lib
PeerDist.dll
Windows
19H1
PeerDistClientAddData
peerdist/PeerDistClientAddData
c++
APIRef
kbSyntax
DllExport
PeerDist.dll
PeerDistClientAddData

PeerDistClientAddData function

-description

The PeerDistClientAddData function is used to supply content to the local cache. Typically this is done when data could not be found on the local network as indicated when either PeerDistClientBlockRead or PeerDistClientStreamRead complete with ERROR_TIMEOUT or PEERDIST_ERROR_MISSING_DATA.

-parameters

-param hPeerDist [in]

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

-param hContentHandle [in]

A PEERDIST_CONTENT_HANDLE returned by PeerDistClientOpenContent.

-param cbNumberOfBytes

The number of bytes to be added to the local cache.

-param pBuffer [in]

Pointer to the buffer that contains the data to be added to the local cache. 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.

-param lpOverlapped [in]

Pointer to an OVERLAPPED structure. The byte offset from the beginning of content, at which this data is being added, is specified by setting the Offset and OffsetHigh members of the OVERLAPPED structure. The OffsetHigh member MUST be set to the higher 32 bits of the byte offset and the Offset member MUST be set to the lower 32 bits of the byte offset.

-returns

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 hContent handle is invalid.
ERROR_ACCESS_DISABLED_BY_POLICY
The feature is disabled by Group Policy.
PEERDIST_ERROR_SERVICE_UNAVAILABLE
The service is unavailable.

-remarks

The data that has been added with this function and passed verification is available to other peers or hosted cache for download. The Peer Distribution service stores this data in its local cache.

If the API completes with PEERDIST_ERROR_OUT_OF_BOUNDS, this indicates that the offset specified in the overlapped structure is beyond the end of the content.

-see-also

PeerDistClientBlockRead

PeerDistClientStreamRead

PeerDistStartup