ShlwApiPathCombine Method
Note: This API is now obsolete.
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("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
[ObsoleteAttribute("Misuse of this function can lead to a buffer overrun. We recommend the use of the safer NativeMethods.PathCchCombine or NativeMethods.PathCchCombineEx function in its place.",
false)]
public static IntPtr PathCombine(
StringBuilder destination,
string dir,
string file
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
<ObsoleteAttribute("Misuse of this function can lead to a buffer overrun. We recommend the use of the safer NativeMethods.PathCchCombine or NativeMethods.PathCchCombineEx function in its place.",
false)>
Public Shared Function PathCombine (
destination As StringBuilder,
dir As String,
file As String
) As IntPtr
Dim destination As StringBuilder
Dim dir As String
Dim file As String
Dim returnValue As IntPtr
returnValue = ShlwApi.PathCombine(destination,
dir, file)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
[ObsoleteAttribute(L"Misuse of this function can lead to a buffer overrun. We recommend the use of the safer NativeMethods.PathCchCombine or NativeMethods.PathCchCombineEx function in its place.",
false)]
static IntPtr PathCombine(
StringBuilder^ destination,
String^ dir,
String^ file
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
[<ObsoleteAttribute("Misuse of this function can lead to a buffer overrun. We recommend the use of the safer NativeMethods.PathCchCombine or NativeMethods.PathCchCombineEx function in its place.",
false)>]
static member PathCombine :
destination : StringBuilder *
dir : string *
file : string -> IntPtr
No code example is currently available or this language may not be supported.
- destination StringBuilder
-
A pointer to a buffer that, when this function returns successfully, receives the combined path string.
You must set the size of this buffer to MAX_PATH to ensure that it is large enough to hold the returned string.
- dir String
-
A pointer to a null-terminated string of maximum length MAX_PATH that contains the first path. This value can be NULL.
- file String
-
A pointer to a null-terminated string of maximum length MAX_PATH that contains the second path. This value can be NULL.
IntPtr
A pointer to a buffer that, when this function returns successfully, receives the concatenated path string.
This is the same string pointed to by
destination.
If this function does not return successfully, this value is NULL.