/// <summary>
/// Parses a path to determine if it is a directory root.
/// </summary>
/// <param name="pszPath">A pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be validated.</param>
/// <returns>Returns TRUE if the specified path is a root, or FALSE otherwise.</returns>
/// <example>Returns TRUE for paths such as "\", "X:\" or "\\server\share". Paths such as "..\path2" or "\\server\" return FALSE.</example>
[DllImport("shlwapi.dll", EntryPoint = "PathIsRootW", SetLastError = True, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool PathIsRoot([MarshalAs(UnmanagedType.LPTStr)]string pszPath);
''' <summary>
''' Parses a path to determine if it is a directory root.
''' </summary>
''' <param name="pszPath">A pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be validated.</param>
''' <returns>Returns TRUE if the specified path is a root, or FALSE otherwise.</returns>
''' <example>Returns TRUE for paths such as "\", "X:\" or "\\server\share". Paths such as "..\path2" or "\\server\" return FALSE.</example>
<DllImport("shlwapi.dll", EntryPoint:="PathIsRootW", SetLastError:=True, CharSet:=CharSet.Unicode)> _
Public Function PathIsRoot(<MarshalAs(UnmanagedType.LPTStr)>pszPath As String) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
Public Declare Function PathIsRoot Lib "shlwapi" Alias "PathIsRootA" _
(ByVal pszPath As String) As Long
None.
Do you know one? Please contribute it!
None.
Please add some!
Please add some!