UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:shlwapi.PathRenameExtensionA |
PathRenameExtensionA function (shlwapi.h) |
Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string. (ANSI) |
|
shell\PathRenameExtension.htm |
shell |
3d94f67c-e3ee-4b64-b0b9-8f771423bdc5 |
12/05/2018 |
PathRenameExtension, PathRenameExtension function [Windows Shell], PathRenameExtensionA, PathRenameExtensionW, _win32_PathRenameExtension, shell.PathRenameExtension, shlwapi/PathRenameExtension, shlwapi/PathRenameExtensionA, shlwapi/PathRenameExtensionW |
shlwapi.h |
Windows |
Windows 2000 Professional, Windows XP [desktop apps only] |
Windows 2000 Server [desktop apps only] |
PathRenameExtensionW (Unicode) and PathRenameExtensionA (ANSI) |
Shlwapi.lib |
Shlwapi.dll (version 4.71 or later) |
Windows |
19H1 |
|
|
|
|
|
|
Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.
Type: LPTSTR
Pointer to a null-terminated string of length MAX_PATH in which to replace the extension.
Type: LPCTSTR
Pointer to a character buffer that contains a '.' character followed by the new extension.
Type: BOOL
Returns nonzero if successful, or zero if the new path and extension would exceed MAX_PATH characters.
Note
The shlwapi.h header defines PathRenameExtension as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.