PeerDistServerOpenContentInformationEx function (peerdist.h)

The PeerDistServerOpenContentInformationEx function opens a PEERDIST_CONTENTINFO_HANDLE. The client uses the handle to retrieve content information.

Syntax

DWORD PeerDistServerOpenContentInformationEx(
  [in]           PEERDIST_INSTANCE_HANDLE     hPeerDist,
  [in]           DWORD                        cbContentIdentifier,
  [in]           PBYTE                        pContentIdentifier,
                 ULONGLONG                    ullContentOffset,
                 ULONGLONG                    cbContentLength,
  [in]           PEERDIST_RETRIEVAL_OPTIONS   *pRetrievalOptions,
  [in, optional] HANDLE                       hCompletionPort,
  [in, optional] ULONG_PTR                    ulCompletionKey,
  [out]          PPEERDIST_CONTENTINFO_HANDLE phContentInfo
);

Parameters

[in] hPeerDist

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

[in] cbContentIdentifier

The length, in bytes, of the content identifier.

[in] pContentIdentifier

Pointer to a buffer that contains the content identifier.

ullContentOffset

An offset from the beginning of the published content for which the content information handle is requested.

cbContentLength

The length, in bytes, of the content (starting from the ullContentOffset) for which the content information is requested.

[in] pRetrievalOptions

A PEER_RETRIEVAL_OPTIONS structure specifying additional options for retrieving content information.

[in, optional] hCompletionPort

A handle to the completion port used for retrieving the completion notification of the asynchronous function. To create a completion port, use the CreateIoCompletionPort function. This parameter can be NULL.

[in, optional] ulCompletionKey

Value to be returned through the lpCompletionKey parameter of the GetQueuedCompletionStatus function. This parameter is ignored when hCompletionPort is NULL.

[out] phContentInfo

A handle used to retrieve the content information.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

Remarks

If function succeeds, the handle received by phContentInfo can be passed to the
PeerDistServerRetrieveContentInformation function to retrieve content information. The handle must be closed via the PeerDistServerCloseContentInformation function.

If ullContentOffset and cbContentLength are both zero, then the content information for the whole content will be retrieved.

The pRetrievalOptions parameter can be used to specify the range of content information versions that the requesting client is configured to process. This enables the client to retrieve an applicable version of the content information structure.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header peerdist.h

See also

CreateIoCompletionPort

PEER_RETRIEVAL_OPTIONS

PeerDistServerCloseContentInformation

PeerDistServerRetrieveContentInformation

PeerDistStartup