KernelBasePathCchRemoveExtension Method
Removes the file name extension from a path, if one is present..
This function differs from
PathRemoveExtension(StringBuilder) in that
it accepts paths with "\", "\?" and "\?\UNC" prefixes.
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)]
public static HResult PathCchRemoveExtension(
StringBuilder buffer,
uint bufferSize
)
<DllImportAttribute("KernelBase.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true>]
Public Shared Function PathCchRemoveExtension (
buffer As StringBuilder,
bufferSize As UInteger
) As HResult
Dim buffer As StringBuilder
Dim bufferSize As UInteger
Dim returnValue As HResult
returnValue = KernelBase.PathCchRemoveExtension(buffer,
bufferSize)
public:
[DllImportAttribute(L"KernelBase.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
static HResult PathCchRemoveExtension(
StringBuilder^ buffer,
unsigned int bufferSize
)
[<DllImportAttribute("KernelBase.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)>]
static member PathCchRemoveExtension :
buffer : StringBuilder *
bufferSize : uint32 -> HResult
No code example is currently available or this language may not be supported.
- buffer StringBuilder
-
A pointer to the path string.
When this function returns successfully, the string contains the path with any extension removed.
If no extension was found, the string is unchanged.
- bufferSize UInt32
-
The size of the buffer pointed to by buffer, in characters.
HResult
If this function succeeds, it returns
S_OK.
Otherwise, it returns an
HResult error code.