/// <summary>
/// Removes the file name extension from a path, if one is present.
/// </summary>
/// <param name="pszFile">A pointer to a null-terminated string of length MAX_PATH from which to remove the extension.</param>
[DllImport("shlwapi.dll", EntryPoint = "PathRemoveExtensionW", SetLastError = True, CharSet= CharSet.Unicode)]
static extern void PathRemoveExtension([MarshalAs(UnmanagedType.LPTStr)]System.Text.StringBuilder pszFile);
''' <summary>
''' Removes the file name extension from a path, if one is present.
''' </summary>
''' <param name="pszFile">A pointer to a null-terminated string of length MAX_PATH from which to remove the extension.</param>
<DllImport("shlwapi.dll", EntryPoint:="PathRemoveExtensionW", SetLastError:=True, CharSet:=CharSet.Unicode)> _
Public Sub PathRemoveExtension(<MarshalAs(UnmanagedType.LPTStr)>pszFile As System.Text.StringBuilder)
End Sub
Public Declare Sub PathRemoveExtension Lib "shlwapi" Alias "PathRemoveExtensionA" _
(ByVal pszPath As String)
None.
Do you know one? Please contribute it!
None.
Please add some!
Dim strFile As New system.Text.StringBuilder(255)
strFile.Append("c:\abc\def\words.doc")
Win32.API.Shlwapi.PathRemoveExtension(strFile)
System.Diagnostics.Debug.WriteLine(strFile.ToString())