PrjStartVirtualizing function (projectedfslib.h)

Configures a ProjFS virtualization instance and starts it, making it available to service I/O and invoke callbacks on the provider.

Syntax

HRESULT PrjStartVirtualizing(
  [in]           PCWSTR                               virtualizationRootPath,
  [in]           const PRJ_CALLBACKS                  *callbacks,
  [in, optional] const void                           *instanceContext,
  [in, optional] const PRJ_STARTVIRTUALIZING_OPTIONS  *options,
  [out]          PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT *namespaceVirtualizationContext
);

Parameters

[in] virtualizationRootPath

Pointer to a null-terminated unicode string specifying the full path to the virtualization root directory.

The provider must have called PrjMarkDirectoryAsPlaceholder passing the specified path as the rootPathName parameter and NULL as the targetPathName parameter before calling this routine. This only needs to be done once to designate the path as the virtualization root directory

[in] callbacks

Pointer to a PRJ_CALLBACKS structure that has been filled in with pointers to the provider's callback functions.

[in, optional] instanceContext

Pointer to context information defined by the provider for each instance. This parameter is optional and can be NULL. If it is specified, ProjFS will return it in the InstanceContext member of PRJ_CALLBACK_DATA when invoking provider callback routines.

[in, optional] options

An optional pointer to a PRJ_STARTVIRTUALIZING_OPTIONS.

[out] namespaceVirtualizationContext

On success returns an opaque handle to the ProjFS virtualization instance. The provider passes this value when calling functions that require a PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT as input.

Return value

The error, HRESULT_FROM_WIN32(ERROR_REPARSE_TAG_MISMATCH), indicates that virtualizationRootPath has not been configured as a virtualization root.

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