ShlwApiPathRelativePathTo Method

Creates a relative path from one file or folder to another.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PathRelativePathTo(
	StringBuilder path,
	string from,
	FileAttributes attrFrom,
	string to,
	FileAttributes attrTo
)

Parameters

path  StringBuilder
A string buffer that receives the relative path.

This buffer must be at least MAX_PATH characters in size.

from  String
A null-terminated string of maximum length MAX_PATH that contains the path that defines the start of the relative path.
attrFrom  FileAttributes
The file attributes of from parameter.

If this value contains Directory, from parameter is assumed to be a directory; otherwise, from parameter is assumed to be a file.

to  String

[Missing <param name="to"/> documentation for "M:DevCase.Win32.NativeMethods.ShlwApi.PathRelativePathTo(System.Text.StringBuilder,System.String,System.IO.FileAttributes,System.String,System.IO.FileAttributes)"]

attrTo  FileAttributes
The file attributes of [to] parameter.

If this value contains Directory, [to] parameter is assumed to be directory; otherwise, [to] parameter is assumed to be a file.

Return Value

Boolean
Returns if successful, or otherwise.

Remarks

See Also