The GetFileTitle function returns the name of the file identified by the lpszFile parameter.
Declare Function GetFileTitle Lib "comdlg32.dll" Alias "GetFileTitleA" (ByVal lpszFile As String, ByVal lpszTitle As String, ByVal cbBuf As Integer) As Integer
|Operating Systems Supported|
|Requires Windows NT 3.1 or later; Requires Windows 95 or later|
Pointer to the name and location of a file.
Pointer to a buffer into which the function is to copy the name of the file.
Specifies the length, in characters, of the buffer pointed to by the lpszTitle parameter.
|If the function succeeds, the return value is zero. |
If the filename is invalid, the return value is a negative number.
If the buffer pointed to by the lpszTitle parameter is too small, the return value is a positive integer that specifies the required buffer size, in bytes (ANSI version) or characters (Unicode version). The required buffer size includes the terminating null character.