AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

GetShortPathName

The GetShortPathName function obtains the short path form of a specified input path.

VB4-32,5,6
Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

Operating Systems Supported
Requires Windows NT 3.5(1) or later; Requires Windows 95 or later

Library
Kernel32

Parameter Information
· lpszLongPath
Points to a null-terminated path string. The function obtains the short form of this path.

· lpszShortPath
Points to a buffer to receive the null-terminated short form of the path specified by lpszLongPath.

· cchBuffer
Specifies the size, in characters, of the buffer pointed to by lpszShortPath.

Return Values
If the function succeeds, the return value is the length, in characters, of the string copied to lpszShortPath, not including the terminating null character.

If the function fails due to the lpszShortPath buffer being too small to contain the short path string, the return value is the size, in characters, of the short path string. You need to call the function with a short path buffer that is at least as large as the short path string.

If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError.

Examples

Related Functions

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/