Skip to main content

Windows Dev Center

PeerDistServerOpenContentInformationEx function

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


DWORD WINAPI PeerDistServerOpenContentInformationEx(
  _In_     PEERDIST_INSTANCE_HANDLE     hPeerDist,
  _In_     DWORD                        cbContentIdentifier,
  _In_     PBYTE                        pContentIdentifier,
           ULONGLONG                    ullContentOffset,
           ULONGLONG                    cbContentLength,
  _In_     PEERDIST_RETRIEVAL_OPTIONS   *pRetrievalOptions,
  _In_opt_ HANDLE                       hCompletionPort,
  _In_opt_ ULONG_PTR                    ulCompletionKey,


hPeerDist [in]

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

cbContentIdentifier [in]

The length, in bytes, of the content identifier.

pContentIdentifier [in]

Pointer to a buffer that contains the content identifier.


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


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

pRetrievalOptions [in]

A PEER_RETRIEVAL_OPTIONS structure specifying additional options for retrieving content information.

hCompletionPort [in, optional]

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.

ulCompletionKey [in, optional]

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

phContentInfo [out]

A handle used to retrieve the content information.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.


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.


Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]



See also