|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| No
| Win32s
| No
| Import Library
| kernel32.lib
| Header File
| winbase.h
| Unicode
| WinNT
| Platform Notes
| None
|
|
|
GetFileAttributesEx
[New - Windows NT]
The GetFileAttributesEx function obtains attribute information about a specified file or directory.
This function is similar to the GetFileAttributes function. GetFileAttributes returns a set of FAT-style attribute information. GetFileAttributesEx is designed to obtain other sets of file or directory attribute information.
Currently, GetFileAttributeEx obtains a set of standard attributes that is a superset of the FAT-style
attribute information.
BOOL GetFileAttributesEx(
LPCTSTR lpFileName,
| // pointer to string that specifies a file or directory
| GET_FILEEX_INFO_LEVELS fInfoLevelId,
| // value that specifies the type of attribute information to obtain
| LPVOID lpFileInformation
| // pointer to buffer to receive attribute information
| );
|
|
Parameters
lpFileName
Pointer to a null-terminated string that specifies a file or directory.
By default, this string is limited to MAX_PATH characters. The limit is
related to how the GetFileAttributesEx function parses paths. An application can transcend this limit and send in
paths longer than MAX_PATH characters by calling the wide (W) version of GetFileAttributesEx and prepending "\\?\" to the path. The "\\?\" tells the function to turn off path parsing. This technique also works with
UNC names. The "\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\peanuts\hotstuff\coolapps" is seen as "\\peanuts\hotstuff\coolapps".
fInfoLevelId
Enumeration type value that specifies the set of attribute information to
obtain.
You can use the following value for fInfoLevelId:
Value
| Meaning
| GetFileExInfoStandard
| The function obtains a standard set of attribute information. The data is
returned in a WIN32_FILE_ATTRIBUTE_DATA structure.
|
Future releases of Win32-based operating systems and extensions may define
other values for the GET_FILEEX_INFO_LEVELS enum type.
lpFileInformation
Pointer to a buffer that receives the attribute information.
The type of attribute information stored into this buffer is determined by the
value of fInfoLevelId, as follows:
Return Values
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error
information, call GetLastError.
See Also
GetFileAttributes, SetFileAttributes, WIN32_FILE_ATTRIBUTE_DATA
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|