PathCchStripPrefix function

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

Syntax

WINPATHCCHAPI HRESULT PathCchStripPrefix(
  PWSTR  pszPath,
  size_t cchPath
);

Parameters

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.

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

   
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