Group: Shell Lightweight Utility APIs -- Path Functions - Library: shlwapi
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
BOOL PathRenameExtension(
LPTSTR pszPath,
LPCTSTR pszExt
);
DECLARE INTEGER PathRenameExtension IN shlwapi;
STRING @ pszPath,;
STRING pszExt
pszPath [in] Pointer to a null-terminated string of maximum length MAX_PATH in which to replace the extension.
pszExt [in] Address of a character buffer that contains a "." followed by the new extension.
Returns nonzero if successful, or zero if the new path and extension would exceed MAX_PATH characters.