ShlwApiPathCanonicalize 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.PathCchCanonicalize or NativeMethods.PathCchCanonicalizeEx function in its place.",
false)]
public static bool PathCanonicalize(
StringBuilder buffer,
string path
)
<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.PathCchCanonicalize or NativeMethods.PathCchCanonicalizeEx function in its place.",
false)>
Public Shared Function PathCanonicalize (
buffer As StringBuilder,
path As String
) As Boolean
Dim buffer As StringBuilder
Dim path As String
Dim returnValue As Boolean
returnValue = ShlwApi.PathCanonicalize(buffer,
path)
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.PathCchCanonicalize or NativeMethods.PathCchCanonicalizeEx function in its place.",
false)]
static bool PathCanonicalize(
StringBuilder^ buffer,
String^ path
)
[<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.PathCchCanonicalize or NativeMethods.PathCchCanonicalizeEx function in its place.",
false)>]
static member PathCanonicalize :
buffer : StringBuilder *
path : string -> bool
No code example is currently available or this language may not be supported.
- buffer StringBuilder
-
A pointer to a string that receives the canonicalized path.
You must set the size of this buffer to MAX_PATH to ensure that it is large enough to hold the returned string.
- path String
-
A pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be canonicalized.
Boolean
Returns
if a result has been computed and the content of
the
buffer output buffer is valid.
Returns
otherwise, and the contents of the buffer pointed to by
buffer are invalid.