CfSetPinState function (cfapi.h)
This sets the pin state of a placeholder, used to represent a user’s intent. Any application (not just the sync provider) can call this function.
Syntax
HRESULT CfSetPinState(
[in] HANDLE FileHandle,
[in] CF_PIN_STATE PinState,
[in] CF_SET_PIN_FLAGS PinFlags,
[in, out, optional] LPOVERLAPPED Overlapped
);
Parameters
[in] FileHandle
The handle of the placeholder file. The caller must have READ_DATA or WRITE_DAC access to the placeholder.
[in] PinState
The pin state of the placeholder file.
[in] PinFlags
The pin state flags.
[in, out, optional] Overlapped
Allows the call to be performed asynchronously. See the Remarks section for more details.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
When specified and combined with an asynchronous FileHandle, Overlapped allows the platform to perform the call asynchronously.
The caller must have initialized the overlapped structure with an event to wait on. If this returns HRESULT_FROM_WIN32(ERROR_IO_PENDING), the caller can then wait using GetOverlappedResult. If not specified, the platform will perform the API call synchronously, regardless of how the handle was created.
Requirements
| Minimum supported client | Windows 10, version 1709 [desktop apps only] |
| Minimum supported server | Windows Server 2016 [desktop apps only] |
| Target Platform | Windows |
| Header | cfapi.h |
| Library | CldApi.lib |
| DLL | CldApi.dll |