Skip to content

Latest commit

 

History

History
77 lines (62 loc) · 2.5 KB

nf-pathcch-pathcchfindextension.md

File metadata and controls

77 lines (62 loc) · 2.5 KB
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:pathcch.PathCchFindExtension
PathCchFindExtension function (pathcch.h)
Searches a path to find its file name extension, such as ".exe" or ".ini".
PathCchFindExtension
PathCchFindExtension function [Windows Shell]
pathcch/PathCchFindExtension
shell.PathCchFindExtension
shell\PathCchFindExtension.htm
shell
dac6cf02-7b53-449c-b788-4a7b6d1622ed
12/05/2018
PathCchFindExtension, PathCchFindExtension function [Windows Shell], pathcch/PathCchFindExtension, shell.PathCchFindExtension
pathcch.h
Windows
Windows 8 [desktop apps \| UWP apps]
Windows Server 2012 [desktop apps \| UWP apps]
Pathcch.lib
Windows
19H1
PathCchFindExtension
pathcch/PathCchFindExtension
c++
APIRef
kbSyntax
DllExport
pathcch.lib
API-MS-Win-Core-Path-l1-1-0.dll
KernelBase.dll
PathCchFindExtension

PathCchFindExtension function

-description

Searches a path to find its file name extension, such as ".exe" or ".ini". This function does not search for a specific extension; it searches for the presence of any extension.

This function differs from PathFindExtension in that it accepts paths with "\", "\?" and "\?\UNC" prefixes.

Note  This function should be used in place of PathFindExtension to prevent the possibility of a buffer overrun.

-parameters

-param pszPath [in]

A pointer to the path to search.

-param cchPath [in]

The size of the buffer pointed to by pszPath in characters, including the null terminator.

-param ppszExt [out]

The address of a pointer that, when this function returns successfully, points to the "." character that precedes the extension within pszPath. If no extension is found, it points to the string's terminating null character.

-returns

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.