SHFILEINFO Structure

Type SHFILEINFO
  hIcon As Long
  iIcon As Long
  dwAttributes As Long
  szDisplayName As String * 260
  szTypeName As String * 80
End Type

Description & Usage

The SHFILEINFO structure holds information about a file system object pertaining to the system shell. The structure can hold such information as a handle to its icon and its display name in the shell. Depending on the flags used in the SHGetFileInfo function, not all of the structure's data members may necessarily hold useful information.

Visual Basic-Specific Issues

None.

Data Members

hIcon
A handle to the icon used to represent the file system object in the shell. Your program must destroy this icon via DestroyIcon after using it to save resources.
iIcon
The index of the file system's icon within the system image list.
dwAttributes
A combination of the following flags specifying the attributes of the file system object:
FILE_ATTRIBUTE_ARCHIVE
An archive file (which most files are).
FILE_ATTRIBUTE_COMPRESSED
A file residing in a compressed drive or directory.
FILE_ATTRIBUTE_DIRECTORY
A directory instead of a file.
FILE_ATTRIBUTE_HIDDEN
A hidden file, not normally visible to the user.
FILE_ATTRIBUTE_NORMAL
An attribute-less file (cannot be combined with other attributes).
FILE_ATTRIBUTE_READONLY
A read-only file.
FILE_ATTRIBUTE_SYSTEM
A system file, used exclusively by the operating system.
szDisplayName
A null-terminated string specifying the name of the file system object as it appears in the system shell. For files, this will be the full path and filename.
szTypeName
A null-terminated string specifying the name of the type of the file system object.

Constant Definitions

Const FILE_ATTRIBUTE_ARCHIVE = &H20
Const FILE_ATTRIBUTE_COMPRESSED = &H800
Const FILE_ATTRIBUTE_DIRECTORY = &H10
Const FILE_ATTRIBUTE_HIDDEN = &H2
Const FILE_ATTRIBUTE_NORMAL = &H0
Const FILE_ATTRIBUTE_READONLY = &H1
Const FILE_ATTRIBUTE_SYSTEM = &H4

Used By

SHGetFileInfo

Go back to the alphabetical Structure listing.
Go back to the Reference section index.


Last Modified: December 22, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/s/shfileinfo.html