PrjWritePlaceholderInfo function (projectedfslib.h)

Sends file or directory metadata to ProjFS.

Syntax

HRESULT PrjWritePlaceholderInfo(
  [in] PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT namespaceVirtualizationContext,
  [in] PCWSTR                               destinationFileName,
  [in] const PRJ_PLACEHOLDER_INFO           *placeholderInfo,
  [in] UINT32                               placeholderInfoSize
);

Parameters

[in] namespaceVirtualizationContext

Opaque handle for the virtualization instance. This must be the value from the VirtualizationInstanceHandle member of the callbackData passed to the provider in the PRJ_GET_PLACEHOLDER_INFO_CB callback.

[in] destinationFileName

A null-terminated Unicode string specifying the path, relative to the virtualization root, to the file or directory for which to create a placeholder.

This must be a match to the FilePathName member of the callbackData parameter passed to the provider in the PRJ_GET_PLACEHOLDER_INFO_CB callback. The provider should use the PrjFileNameCompare function to determine whether the two names match.

For example, if the PRJ_GET_PLACEHOLDER_INFO_CB callback specifies “dir1\dir1\FILE.TXT” in callbackData->FilePathName, and the provider’s backing store contains a file called “File.txt” in the dir1\dir2 directory, and PrjFileNameCompare returns 0 when comparing the names “FILE.TXT” and “File.txt”, then the provider specifies “dir1\dir2\File.txt” as the value of this parameter.

[in] placeholderInfo

A pointer to the metadata for the file or directory.

[in] placeholderInfoSize

Size in bytes of the buffer pointed to by placeholderInfo.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The provider uses this routine to provide the data requested in an invocation of its PRJ_GET_PLACEHOLDER_INFO_CB callback, or it may use it to proactively lay down a placeholder.

The EaInformation, SecurityInformation, and StreamsInformation members of PRJ_PLACEHOLDER_INFO are optional. If the provider does not wish to provide extended attributes, custom security descriptors, or alternate data streams, it must set these fields to 0.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server [desktop apps only]
Target Platform Windows
Header projectedfslib.h