.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH PathRelativePathToA 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBPathRelativePathToA\fR (SHLWAPI.@) .SH SYNOPSIS BOOL PathRelativePathToA ( LPSTR \fIlpszPath\fR, LPCSTR \fIlpszFrom\fR, DWORD \fIdwAttrFrom\fR, LPCSTR \fIlpszTo\fR, DWORD \fIdwAttrTo\fR ) .SH DESCRIPTION .PP Create a relative path from one path to another. .SH PARAMS \fIlpszPath\fR \fB[Out]\fR Destination for relative path. .PP \fIlpszFrom\fR \fB[In]\fR Source path. .PP \fIdwAttrFrom\fR \fB[In]\fR File attribute of source path. .PP \fIlpszTo\fR \fB[In]\fR Destination path. .PP \fIdwAttrTo\fR \fB[In]\fR File attributes of destination path. .PP .SH RETURNS .PP \fBTRUE\fR If a relative path can be formed. \fIlpszPath\fR contains the new path \fBFALSE\fR If the paths are not relative or any parameters are invalid. .SH NOTES .PP \fIlpszTo\fR should be at least \fBMAX_PATH\fR in length. .PP Calling this function with relative paths for \fIlpszFrom\fR or \fIlpszTo\fR may give erroneous results. .PP The Win32 version of this function contains a bug where the \fIlpszTo\fR string may be referenced \fB1\fR 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. .PP This bug has been fixed here, so for example the relative path from \fB"\\"\fR to \fB"\\"\fR is correctly determined as \fB"."\fR in this implementation. .SH IMPLEMENTATION .PP Declared in \fB"shlwapi.h"\fR. .PP Implemented in \fB"dlls/shlwapi/path.c"\fR. .PP Debug channel \fB"shell"\fR.