Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
The PeerDistClientOpenContent function opens and returns a PEERDIST_CONTENT_HANDLE. The client uses the content handle to retrieve data from the Peer Distribution service.
Syntax
DWORD PeerDistClientOpenContent(
[in] PEERDIST_INSTANCE_HANDLE hPeerDist,
[in] PCPEERDIST_CONTENT_TAG pContentTag,
[in, optional] HANDLE hCompletionPort,
[in, optional] ULONG_PTR ulCompletionKey,
[out] PPEERDIST_CONTENT_HANDLE phContentHandle
);
Parameters
[in] hPeerDist
A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.
[in] pContentTag
Pointer to a PEERDIST_CONTENT_TAG structure that contains a 16 byte client specified identifier. This parameter is used in conjunction with the PeerDistClientFlushContent function.
[in, optional] hCompletionPort
A handle to the completion port that can be 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] phContentHandle
A pointer to a variable that receives the PEERDIST_CONTENT_HANDLE used to retrieve or add data.
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 feature is disabled by Group Policy. |
|
The service is unavailable. |
Remarks
Client must call the PeerDistClientOpenContent function to obtain a PEERDIST_CONTENT_HANDLE handle that later can be used in the following functions:
- PeerDistClientAddContentInformation
- PeerDistClientCompleteContentInformation
- PeerDistClientBlockRead
- PeerDistClientStreamRead
- PeerDistClientAddData
The handle returned by PeerDistClientOpenContent function call must be closed by PeerDistClientCloseContent function.
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
PeerDistClientAddContentInformation