PrjWritePlaceholderInfo2 function (projectedfslib.h)
Sends file or directory metadata to ProjFS and allows the caller to specify extended information.
Syntax
HRESULT PrjWritePlaceholderInfo2(
[in] PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT namespaceVirtualizationContext,
[in] PCWSTR destinationFileName,
[in] const PRJ_PLACEHOLDER_INFO *placeholderInfo,
[in] UINT32 placeholderInfoSize,
const PRJ_EXTENDED_INFO *ExtendedInfo
);
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.
ExtendedInfo
A pointer to a PRJ_EXTENDED_INFO struct specifying extended information about the placeholder to be created.
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.
Symbolic Links
To specify that this placeholder is to be a symbolic link, the provider formats a buffer with a single PRJ_EXTENDED_INFO struct and passes a pointer to it in the extendedInfo
parameter. The provider sets the struct's fields as follows:
extendedInfo.InfoType = PRJ_EXT_INFO_TYPE_SYMLINK
extendedInfo.NextInfoOffset = 0
extendedInfo.Symlink.TargetName = <path to the target of the symbolic link>
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 2004 (10.0; Build 19041) |
Minimum supported server | Windows Server, version 2004 (10.0; Build 19041) |
Target Platform | Windows |
Header | projectedfslib.h |