Group: Common Dialog Box - Library: comdlg32
Extracting the name and extension parts of a path string
short GetFileTitle(
LPCTSTR lpszFile, // path and file name
LPTSTR lpszTitle, // file name buffer
WORD cbBuf // length of buffer
);
DECLARE SHORT GetFileTitle IN Comdlg32;
STRING lpszFile,;
STRING @ lpszTitle,;
INTEGER cbBuf
lpszFile [in] Pointer to the name and location of a file.
lpszTitle [out] Pointer to a buffer that receives the name of the file.
cbBuf [in] Specifies the length, in TCHARs, of the buffer pointed to by the lpszTitle parameter.
If the function succeeds, the return value is zero. If the file name is invalid, the return value is unknown.
In other words this function extracts the file and extension parts from a legal Win32 path string. Although that does not mean that file should exist.