UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:shlwapi.PathCommonPrefixA |
PathCommonPrefixA function (shlwapi.h) |
Compares two paths to determine if they share a common prefix. A prefix is one of these types:\_"C:\\", ".", "..", "..\\". (ANSI) |
|
shell\PathCommonPrefix.htm |
shell |
13c32b32-8541-41c4-82d8-48d3b2439f0c |
12/05/2018 |
PathCommonPrefix, PathCommonPrefix function [Windows Shell], PathCommonPrefixA, PathCommonPrefixW, _win32_PathCommonPrefix, shell.PathCommonPrefix, shlwapi/PathCommonPrefix, shlwapi/PathCommonPrefixA, shlwapi/PathCommonPrefixW |
shlwapi.h |
Windows |
Windows 2000 Professional, Windows XP [desktop apps only] |
Windows 2000 Server [desktop apps only] |
PathCommonPrefixW (Unicode) and PathCommonPrefixA (ANSI) |
Shlwapi.lib |
Shlwapi.dll (version 4.71 or later) |
Windows |
19H1 |
|
|
|
|
|
|
Compares two paths to determine if they share a common prefix. A prefix is one of these types: "C:\", ".", "..", "..\".
Type: LPCTSTR
A pointer to a null-terminated string of length MAX_PATH that contains the first path name.
Type: LPCTSTR
A pointer to a null-terminated string of length MAX_PATH that contains the second path name.
Type: LPTSTR
A pointer to a buffer that receives the common prefix. This buffer must be at least MAX_PATH characters in size. If there is no common prefix, it is set to NULL.
Type: int
Returns the count of common prefix characters in the path. If the output buffer pointer is not NULL, then these characters are copied to the output buffer.
Note
The shlwapi.h header defines PathCommonPrefix as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.