pathcompactpathex (shlwapi)
Last changed: -92.27.131.29

.
Summary
Truncates a path to fit within a certain number of characters by replacing path components with ellipses.

C# Signature:

[DllImport("shlwapi.dll", CharSet=CharSet.Auto)]
static extern bool PathCompactPathEx([Out] StringBuilder pszOut, string szPath, int cchMax, int dwFlags);

VB Signature:

<DllImport("shlwapi.dll", CharSet:=CharSet.Auto)> _
Shared Function PathCompactPathEx(ByVal pszOut As StringBuilder, _
                   ByVal szPath As String, _
                   ByVal cchMax As Integer, _
                   ByVal dwFlags As Integer) As Boolean
End Function

User-Defined Types:

None.

Notes:

If you have an HDC, take a look at PathCompactPath

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation