PeerDistServerRetrieveContentInformation function (peerdist.h)

The PeerDistServerRetrieveContentInformation function retrieves the encoded content information associated with a handle returned by PeerDistServerOpenContentInformation.

Syntax

DWORD PeerDistServerRetrieveContentInformation(
  [in]      PEERDIST_INSTANCE_HANDLE    hPeerDist,
  [in]      PEERDIST_CONTENTINFO_HANDLE hContentInfo,
            DWORD                       cbMaxNumberOfBytes,
  [in, out] PBYTE                       pBuffer,
  [in]      LPOVERLAPPED                lpOverlapped
);

Parameters

[in] hPeerDist

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

[in] hContentInfo

The handle returned by PeerDistServerOpenContentInformation.

cbMaxNumberOfBytes

The maximum number of bytes to read.

[in, out] pBuffer

Pointer to the buffer that receives the content information data.

[in] lpOverlapped

Pointer to an OVERLAPPED structure. This function does not allow the caller to specify the start Offset in the content. The offset is implicitly maintained per hContentInfo. The Offset and OffsetHigh 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
ERROR_INVALID_PARAMETER
One or more parameters are invalid.
ERROR_INVALID_HANDLE
The hPeerDist or hContentInfo handle is invalid.
PEERDIST_ERROR_NO_MORE
EOF on the content information has been reached.
ERROR_ACCESS_DISABLED_BY_POLICY
The feature is disabled by Group Policy.
PEERDIST_ERROR_SERVICE_UNAVAILABLE
The service is unavailable.

Remarks

On the success of the PeerDistServerRetrieveContentInformation operation, the Offset and OffsetHigh fields of the OVERLAPPED structure will be populated with the ULONGLONG offset in the content information that was retrieved. The OffsetHigh member will be set to the higher 32 bits of the offset and the Offset member will be set to the lower 32 bits of the offset.

GetOverlappedResult will populate lpNumberOfBytesTransferred with the number of bytes transferred. In the event the caller is using a completion port to process Peer Distribution API completions, the lpNumberOfBytes argument of GetQueuedCompletionStatus will be populated with the number of bytes transferred.

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

See also

PeerDistServerOpenContentInformation

PeerDistStartup