KernelBasePathCchAppendEx Method

Appends one path to the end of another.

This function differs from PathCchAppend(StringBuilder, UInt32, String) in that it allows for a longer final path to be constructed.

This function differs from PathAppend(StringBuilder, String) in that it accepts paths with "\", "\?" and "\?\UNC" prefixes.

Note: This function, or PathCchAppend(StringBuilder, UInt32, String), should be used in place of PathAppend(StringBuilder, String) to prevent the possibility of a buffer overrun.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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 PathCchAppendEx(
	StringBuilder buffer,
	uint bufferSize,
	string more,
	PathOptions flags
)

Parameters

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.

flags  PathOptions
Flags that determine how to append the path.

Return Value

HResult
If this function succeeds, it returns S_OK. Otherwise, it returns an HResult code.

Remarks

See Also