На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей 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 | Скачать Вниз

SHGetFileInfo



[Now Supported on Windows NT]

Retrieves information about an object in the file system, such as a file, a folder, a directory, or a drive root.

WINSHELLAPI DWORD WINAPI SHGetFileInfo(

LPCTSTR pszPath,
DWORD dwFileAttributes,
SHFILEINFO FAR *psfi,
UINT cbFileInfo,
UINT uFlags
);


Parameters

pszPath

Pointer to a buffer that contains the path and filename. Both absolute and relative paths are valid. If uFlags includes the SHGFI_PIDL, value pszPath must be the address of an ITEMIDLIST structure that contains the list of item identifiers that uniquely identifies the file within the shell's name space.
This string can use either short (the 8.3 form) or long filenames.

dwFileAttributes

Array of file attribute flags (FILE_ATTRIBUTE_ values). If uFlags does not include the SHGFI_USEFILEATTRIBUTES value, this parameter is ignored.

psfi and cbFileInfo

Address and size, in bytes, of the SHFILEINFO structure that receives the file information.

uFlags

Flag that specifies the file information to retrieve. This parameter can be a combination of the following values:

SHGFI_ATTRIBUTES Retrieves the file attribute flags. The flags are copied to the dwAttributes member of the structure specified by psfi.
SHGFI_DISPLAYNAME Retrieves the display name for the file. The name is copied to the szDisplayName member of the structure specified by psfi.The returned display name uses the long filename, if any, rather than the 8.3 form of the filename.
SHGFI_EXETYPE Returns the type of the executable file if pszPath identifies an executable file. For more information, see the comments below.
SHGFI_ICON Retrieves the handle of the icon that represents the file and the index of the icon within the system image list. The handle is copied to the hIcon member of the structure specified by psfi, and the index is copied to the iIcon member. The return value is the handle of the system image list.
SHGFI_ICONLOCATION Retrieves the name of the file that contains the icon representing the file. The name is copied to the szDisplayName member of the structure specified by psfi.
SHGFI_LARGEICON Modifies SHGFI_ICON, causing the function to retrieve the file's large icon.
SHGFI_LINKOVERLAY Modifies SHGFI_ICON, causing the function to add the link overlay to the file's icon.
SHGFI_OPENICON Modifies SHGFI_ICON, causing the function to retrieve the file's open icon. A container object displays an open icon to indicate that the container is open.
SHGFI_PIDL Indicates that pszPath is the address of an ITEMIDLIST structure rather than a path name.
SHGFI_SELECTED Modifies SHGFI_ICON, causing the function to blend the file's icon with the system highlight color.
SHGFI_SHELLICONSIZE Modifies SHGFI_ICON, causing the function to retrieve a shell-sized icon. If this flag is not specified, the function sizes the icon according to the system metric values.
SHGFI_SMALLICON Modifies SHGFI_ICON, causing the function to retrieve the file's small icon.
SHGFI_SYSICONINDEX Retrieves the index of the icon within the system image list. The index is copied to the iIcon member of the structure specified by psfi. The return value is the handle of the system image list.
SHGFI_TYPENAME Retrieves the string that describes the file's type. The string is copied to the szTypeName member of the structure specified by psfi.
SHGFI_USEFILEATTRIBUTES Indicates that the function should use the dwFileAttributes parameter.


To retrieve the executable file type, uFlags must specify only SHGFI_EXETYPE. The return value specifies the type of the executable file:

0 Nonexecutable file or an error condition.
LOWORD = NE or PE
HIWORD = 3.0, 3.5, or 4.0 Windows application
LOWORD = MZ
HIWORD = 0 MS-DOS .EXE, .COM or .BAT file
LOWORD = PE
HIWORD = 0 Win32 console application


Return Values

· Returns a value whose meaning depends on the uFlags parameter. If uFlags specifies the SHGFI_EXETYPE value, the return value indicates the type of the executable file. For more information, see the comments below.
· If uFlags includes the SHGFI_ICON or SHGFI_SYSICONINDEX value, the return value is the handle of the system image list that contains the large icon images. If the SHGFI_SMALLICON value is also included, the return value is the handle of the image list that contains the small icon images.

· If uFlags does not include SHGFI_EXETYPE, SHGFI_ICON, SHGFI_SYSICONINDEX, or SHGFI_SMALLICON, the return value is nonzero the function succeeds, or zero otherwise.




Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

SHGetFileInfo



[Теперь Поддерживанное на Windows NT]

Извлекает информацию об объекте в файловой системе, как например, файл, папка, директорий, или корень накопителя.

WINSHELLAPI DWORD WINAPI SHGetFileInfo(

LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFO ЗНАЧИТЕЛЬНО *psfi, UINT cbFileInfo, UINT uFlags
);


Параметры

pszPath

Указатель в буфер, который содержит путь и filename. Как абсолютные так и относительные пути в силе. Если uFlags включает SHGFI_PIDL, оцените pszPath должен быть адресом структуры ITEMIDLIST, которая содержит список идентификаторов пункта, который однозначно идентифицирует файл в пределах пространства имени оболочки.
Эта строка может использовать или перемычка ( 8.3 форм) или длинные filenames.

dwFileAttributes

Массив атрибута файла сигнализирует (величины FILE_ATTRIBUTE_). Если uFlags не включает величину SHGFI_USEFILEATTRIBUTES, этот параметр проигнорирован.

psfi и cbFileInfo

Адрес и размер, в байтах, структуры SHFILEINFO, которая получает файловую информацию.

uFlags

Флаг, что определяет файловую информацию, чтобы извлекаться. Этот параметр может быть комбинацией следующего величин:

SHGFI_ATTRIBUTES Извлекает атрибут файла флагов. Флаги скопированы в элемент dwAttributes структуры определенной psfi.
SHGFI_DISPLAYNAME Извлекается, дисплей называет в честь файла. Имя скопировано в элемент szDisplayName структуры определенной psfi.Возвращанное дисплейное имя использует длинный filename, если имеется в наличии, а не 8.3 форм filename.
SHGFI_EXETYPE Возвращает тип выполняемого файла если pszPath идентифицирует выполняемый файл. Более подробно, смотри комментарии ниже.
SHGFI_ICON Извлекает ручку иконки, которая представляет файл и индекс иконки в пределах системного списка образа. Ручка скопирована в элемент hIcon структуры определенной psfi, и индекс скопирован в элемент iIcon. Обратная величина является ручкой системного списка образа.
SHGFI_ICONLOCATION Извлекает имя файла, который содержит иконку, представляющую файл. Имя скопировано в элемент szDisplayName структуры определенной psfi.
SHGFI_LARGEICON Модифицирует SHGFI_ICON, вызывающий функцию, чтобы извлекать файловую большую иконку.
SHGFI_LINKOVERLAY Модифицирует SHGFI_ICON, вызывающий функцию, чтобы добавлять оверлей связи к файловой иконке.
SHGFI_OPENICON Модифицирует SHGFI_ICON, вызывающий функцию, чтобы извлекать файловую открытую иконку. Контейнерный объект отображает открытую иконку, чтобы указывать, что контейнер открытый.
SHGFI_PIDL Указывает, что pszPath - адрес структуры ITEMIDLIST а не имя пути.
SHGFI_SELECTED Модифицирует SHGFI_ICON, вызывающий функцию, чтобы смешивать файловую иконку с системным световым цветом.
SHGFI_SHELLICONSIZE Модифицирует SHGFI_ICON, вызывающий функцию, чтобы извлекать измеренную иконку оболочки. Если этот флаг не определен, функция измеряет иконку в зависимости от того системный показатель оценивается.
SHGFI_SMALLICON Модифицирует SHGFI_ICON, вызывающий функцию, чтобы извлекать файловую небольшую иконку.
SHGFI_SYSICONINDEX Извлекает индекс иконки в пределах системного списка образа. Индекс скопирован в элемент iIcon структуры определенной psfi. Обратная величина является ручкой системного списка образа.
SHGFI_TYPENAME Извлекает строку, которая описывает файловый тип. Строка скопирована в элемент szTypeName структуры определенной psfi.
SHGFI_USEFILEATTRIBUTES Указывает, что функция использует параметр dwFileAttributes.


Для того, чтобы извлекать выполняемый файловый тип, uFlags должен определить только SHGFI_EXETYPE. Обратная величина определяет тип выполняемого файла:

0 Файлов Nonexecutable или условие ошибки.
LOWORD = NE ИЛИ PE
HIWORD = 3.0, 3.5, ИЛИ 4.0 приложений Windows LOWORD = MZ
HIWORD = 0 МС-DOS .EXE, .COM или файл .BAT LOWORD = PE
HIWORD = 0 КОНСОЛЬНЫХ приложений Win32


Обратные Величины

Возврат величина, чье намереваться зависеть от параметра uFlags. Если uFlags определяет величину SHGFI_EXETYPE, обратная величина указывает тип выполняемого файла. Более подробно, смотри комментарии ниже.
Если uFlags включает SHGFI_ICON или величину SHGFI_SYSICONINDEX, обратная величина является ручкой системного списка образа, который содержит большие иконные образы. Если величина SHGFI_SMALLICON также включена, обратная величина является ручкой списка образа, который содержит небольшие иконные образы.

Если uFlags не включает SHGFI_EXETYPE, SHGFI_ICON, SHGFI_SYSICONINDEX, или SHGFI_SMALLICON, обратная величина ненулевая функция получает, или нуль в противном случае.




Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz