ShlwApiPathBuildRoot Method
Creates a root path from a given drive number.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PathBuildRoot (
root As StringBuilder,
driveIndex As Integer
) As IntPtr
Dim root As StringBuilder
Dim driveIndex As Integer
Dim returnValue As IntPtr
returnValue = ShlwApi.PathBuildRoot(root,
driveIndex)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr PathBuildRoot(
StringBuilder^ root,
int driveIndex
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PathBuildRoot :
root : StringBuilder *
driveIndex : int -> IntPtr
No code example is currently available or this language may not be supported.
- 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.
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.