KernelBasePathCchAppend Method
Appends one path to the end of another.
This function differs from
PathCchAppendEx(StringBuilder, UInt32, String, PathOptions) in that
you are restricted to a final path of length MAX_PATH.
This function differs from
PathAppend(StringBuilder, String) in that
it accepts paths with "\", "\?" and "\?\UNC" prefixes.
Note: This function, or
PathCchAppendEx(StringBuilder, UInt32, String, PathOptions),
should be used in place of
PathAppend(StringBuilder, String) to prevent the possibility of a buffer overrun.
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 PathCchAppend(
StringBuilder buffer,
uint bufferSize,
string more
)
<DllImportAttribute("KernelBase.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true>]
Public Shared Function PathCchAppend (
buffer As StringBuilder,
bufferSize As UInteger,
more As String
) As HResult
Dim buffer As StringBuilder
Dim bufferSize As UInteger
Dim more As String
Dim returnValue As HResult
returnValue = KernelBase.PathCchAppend(buffer,
bufferSize, more)
public:
[DllImportAttribute(L"KernelBase.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)]
static HResult PathCchAppend(
StringBuilder^ buffer,
unsigned int bufferSize,
String^ more
)
[<DllImportAttribute("KernelBase.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true)>]
static member PathCchAppend :
buffer : StringBuilder *
bufferSize : uint32 *
more : string -> HResult
No code example is currently available or this language may not be supported.
- buffer StringBuilder
-
A pointer to a buffer that, on entry, contains the original path.
When this function returns successfully, the buffer contains the original path plus the appended path.
- bufferSize UInt32
-
The size of the buffer pointed to by buffer, in characters.
- more String
-
A pointer the path to append to the end of the path pointed to by pszPath.
UNC paths and paths that begin with the sequence \?\ are accepted and recognized as fully-qualified paths.
These paths replace the string pointed to by buffer instead of being appended to it.
HResult
If this function succeeds, it returns
S_OK.
Otherwise, it returns an
HResult code.