Kernel32GetLongPathName Method
Converts the specified path to its long form.
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("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint GetLongPathName(
string shortPath,
StringBuilder longPath,
uint bufferLen
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetLongPathName (
shortPath As String,
longPath As StringBuilder,
bufferLen As UInteger
) As UInteger
Dim shortPath As String
Dim longPath As StringBuilder
Dim bufferLen As UInteger
Dim returnValue As UInteger
returnValue = Kernel32.GetLongPathName(shortPath,
longPath, bufferLen)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetLongPathName(
String^ shortPath,
StringBuilder^ longPath,
unsigned int bufferLen
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetLongPathName :
shortPath : string *
longPath : StringBuilder *
bufferLen : uint32 -> uint32
No code example is currently available or this language may not be supported.
- shortPath String
-
The path to be converted
- longPath StringBuilder
-
A pointer to the buffer to receive the long path.
- bufferLen UInt32
-
The size of the buffer lpszLongPath points to.
UInt32
If the function succeeds, the return value is the length of the string copied to
longPath,
not including the terminating null character.
If the
bufferLen buffer is too small to contain the path, the return value is the size of the
buffer that is required to hold the path and the terminating null character.
If the function fails for any other reason, such as if the file does not exist, the return value is zero.
To get extended error information, call
GetLastWin32Error.