KernelBasePathIsUNCEx Method
Determines if a path string is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter.
This function differs from
PathIsUNC(String) in that it also allows you to extract the name of the server from the path.
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("KernelBase.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PathIsUNCEx(
string path,
ref StringBuilder refServer
)
<DllImportAttribute("KernelBase.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PathIsUNCEx (
path As String,
ByRef refServer As StringBuilder
) As Boolean
Dim path As String
Dim refServer As StringBuilder
Dim returnValue As Boolean
returnValue = KernelBase.PathIsUNCEx(path,
refServer)
public:
[DllImportAttribute(L"KernelBase.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool PathIsUNCEx(
String^ path,
StringBuilder^% refServer
)
[<DllImportAttribute("KernelBase.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PathIsUNCEx :
path : string *
refServer : StringBuilder byref -> bool
No code example is currently available or this language may not be supported.
- path String
-
A pointer to the path string.
- refServer StringBuilder
-
A pointer to a string that, when this function returns successfully,
receives the server portion of the UNC path.
This value can be NULL if you don't need this information.
Boolean
Returns
if the string is a valid UNC path; otherwise,
.