Rechercher une page de manuel
PathRelativePathToA.3w
Langue: en
Version: Jun 2009 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
PathRelativePathToA (SHLWAPI.@)SYNOPSIS
BOOL PathRelativePathToA(
LPSTR lpszPath,
LPCSTR lpszFrom,
DWORD dwAttrFrom,
LPCSTR lpszTo,
DWORD dwAttrTo
)
DESCRIPTION
Create a relative path from one path to another.
PARAMS
lpszPath [Out] Destination for relative path.lpszFrom [In] Source path.
dwAttrFrom [In] File attribute of source path.
lpszTo [In] Destination path.
dwAttrTo [In] File attributes of destination path.
RETURNS
TRUE If a relative path can be formed. lpszPath contains the new path FALSE If the paths are not relative or any parameters are invalid.
NOTES
lpszTo should be at least MAX_PATH in length.
Calling this function with relative paths for lpszFrom or lpszTo may give erroneous results.
The Win32 version of this function contains a bug where the lpszTo string may be referenced 1 byte beyond the end of the string. As a result random garbage may be written to the output path, depending on what lies beyond the last byte of the string. This bug occurs because of the behaviour of PathCommonPrefix() (see notes for that function), and no workaround seems possible with Win32.
This bug has been fixed here, so for example the relative path from "\" to "\" is correctly determined as "." in this implementation.
IMPLEMENTATION
Defined in "shlwapi.h".
Implemented in "dlls/shlwapi/path.c".
Debug channel "shell".
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre