PeerDistClientFlushContent function

The PeerDistClientFlushContent function allows a client to remove content added to the local cache with the PeerDistClientAddData function using the associated PEERDIST_CONTENT_TAG.

Syntax


DWORD WINAPI PeerDistClientFlushContent(
  _In_      PEERDIST_INSTANCE_HANDLE hPeerDist,
  _In_      PCPEERDIST_CONTENT_TAG pContentTag,
  _In_opt_  HANDLE hCompletionPort,
  _In_opt_  ULONG_PTR ulCompletionKey,
  _In_      LPOVERLAPPED lpOverlapped
);

Parameters

hPeerDist [in]

A PEERDIST_INSTANCE_HANDLE returned by PeerDistStartup.

pContentTag [in]

Pointer to a PEERDIST_CONTENT_TAG structure that contains the tag supplied when PeerDistClientOpenContent is called.

hCompletionPort [in, optional]

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.

ulCompletionKey [in, optional]

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

lpOverlapped [in]

Pointer to an OVERLAPPED structure. 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 codeDescription
ERROR_INVALID_PARAMETER

One or more parameters are invalid.

ERROR_INVALID_HANDLE

The hPeerDist handle is invalid.

ERROR_ACCESS_DISABLED_BY_POLICY

The feature is disabled by Group Policy.

PEERDIST_ERROR_SERVICE_UNAVAILABLE

The service is unavailable.

 

Remarks

The pContentTag is a client supplied tag passed to PeerDistClientOpenContent, which labels the content added by the client. This tag is used by the API to selectively flush content from the Peer Distribution cache.

Requirements

Minimum supported client

Windows 7 Professional [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

PeerDist.h

Library

PeerDist.lib

DLL

PeerDist.dll

See also

PeerDistStartup
PEERDIST_CONTENT_TAG
PeerDistClientOpenContent

 

 

Community Additions

ADD
Show:
© 2014 Microsoft