PeerDistServerOpenContentInformation function (peerdist.h)
The PeerDistServerOpenContentInformation function opens a PEERDIST_CONTENTINFO_HANDLE. The client uses the handle to retrieve content information.
Syntax
DWORD PeerDistServerOpenContentInformation(
[in] PEERDIST_INSTANCE_HANDLE hPeerDist,
DWORD cbContentIdentifier,
[in] PBYTE pContentIdentifier,
ULONGLONG ullContentOffset,
ULONGLONG cbContentLength,
[in, optional] HANDLE hCompletionPort,
[in, optional] ULONG_PTR ulCompletionKey,
[out] PPEERDIST_CONTENTINFO_HANDLE phContentInfo
);
Parameters
[in] hPeerDist
A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.
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, 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. Otherwise, the function may return one of the following values:
Return code | Description |
---|---|
|
One or more parameters are invalid. |
|
The hPeerDist handle is invalid. |
|
The specified content identifier data is not published. |
|
The feature is disabled by Group Policy. |
|
The service is unavailable. |
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.
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 |