PathCchStripPrefix function (pathcch.h)

Removes the "\?" prefix, if present, from a file path.

Syntax

WINPATHCCHAPI HRESULT PathCchStripPrefix(
  [in, out] PWSTR  pszPath,
  [in]      size_t cchPath
);

Parameters

[in, out] pszPath

A pointer to the path string. When this function returns successfully, the same path string will have had the prefix removed, if the prefix was present. If no prefix was present, the string will be unchanged.

[in] cchPath

The size of the buffer pointed to by pszPath, in characters.

Return value

This function returns S_OK if the prefix was removed, S_FALSE if the path did not have a prefix to remove, or an HRESULT failure code.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header pathcch.h
Library Pathcch.lib