A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



GetFileTitle

The GetFileTitle function returns the name of the file identified by the lpszFile parameter.

VB4-32,5,6
Declare Function GetFileTitle Lib "comdlg32.dll" Alias "GetFileTitleA" (ByVal lpszFile As String, ByVal lpszTitle As String, ByVal cbBuf As Integer) As Integer

VB.NET
System.IO.FileInfo.Name

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later

Library
Comdlg32

Parameter Information
- lpszFile
Pointer to the name and location of a file.

- lpszTitle
Pointer to a buffer into which the function is to copy the name of the file.

- cbBuf
Specifies the length, in characters, of the buffer pointed to by the lpszTitle parameter.

Return Values
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.

Last update: 07 April 2006