Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than shlwapi, prefix the name with the module name and a period.
PathBuildRoot (shlwapi)
.
C# Signature:
/// <summary>
/// Creates a root path from a given drive number
/// </summary>
/// <param name="szRoot">A pointer to the string that receives the constructed root path. This buffer must be at least four characters in size</param>
/// <param name="iDrive">A variable of type int that indicates the desired drive number. It should be between 0 and 25.</param>
/// <returns>Returns the address of the constructed root path. If the call fails for any reason (for example, an invalid drive number), szRoot is returned unchanged.</returns>
[DllImport("shlwapi.dll", EntryPoint = "PathBuildRootW", SetLastError = True, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.LPTStr)]
static extern string PathBuildRoot([MarshalAs(UnmanagedType.LPTStr)]szRoot As System.Text.StringBuilder,
iDrive As Integer);
VB.NET Signature
''' <summary>
''' Creates a root path from a given drive number
''' </summary>
''' <param name="szRoot">A pointer to the string that receives the constructed root path. This buffer must be at least four characters in size</param>
''' <param name="iDrive">A variable of type int that indicates the desired drive number. It should be between 0 and 25.</param>
''' <returns>Returns the address of the constructed root path. If the call fails for any reason (for example, an invalid drive number), szRoot is returned unchanged.</returns>
<DllImport("shlwapi.dll", EntryPoint:="PathBuildRootW", SetLastError:=True, CharSet:=CharSet.Unicode)> _
Public Function PathBuildRoot(<MarshalAs(UnmanagedType.LPTStr)>szRoot As System.Text.StringBuilder, _
iDrive As Integer) as <MarshalAs(UnmanagedType.LPTStr)>String
End Function
VB Signature:
Public Declare Function PathBuildRoot Lib "shlwapi" Alias "PathBuildRootA" _
(ByVal szRoot As String, _
ByVal iDrive As Integer) As Long
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
PathBuildRoot - Creates a root path from a given drive number
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).