ShlwApiPathBuildRoot Method

Creates a root path from a given drive number.

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 IntPtr PathBuildRoot(
	StringBuilder root,
	int driveIndex
)

Parameters

root  StringBuilder
A pointer to the string that receives the constructed root path. This buffer must be at least four characters in size.
driveIndex  Int32
A variable of type int that indicates the desired drive number. It should be between 0 and 25.

Return Value

IntPtr
Returns the address of the constructed root path.

If the call fails for any reason (for example, an invalid drive number), root is returned unchanged.

Remarks

See Also