请教一个简单的WinApi用法(50分)

  • 主题发起人 主题发起人 lizheng
  • 开始时间 开始时间
L

lizheng

Unregistered / Unconfirmed
GUEST, unregistred user!
WINSHELLAPI DWORD WINAPI SHGetFileInfo(<br>&nbsp; &nbsp; LPCTSTR pszPath,<br>&nbsp; &nbsp; DWORD dwFileAttributes,<br>&nbsp; &nbsp;~~~~~~~~~~~~~什么用?它都可赋哪些值?<br>&nbsp; &nbsp; SHFILEINFO FAR *psfi,<br>&nbsp; &nbsp; UINT cbFileInfo,<br>&nbsp; &nbsp; UINT uFlags<br>);<br><br>
 
dwFileAttributes<br><br>Array of file attribute flags (FILE_ATTRIBUTE_ values). If uFlags <br>does not include the SHGFI_USEFILEATTRIBUTES value, this parameter is<br>&nbsp;ignored.
 
dwFileAttributes应该就是文件的属性值吧?
 
//可能是<br>FILE_ATTRIBUTE_ARCHIVE The file should be archived. Applications use this attribute to mark files for backup or removal.<br>FILE_ATTRIBUTE_COMPRESSED The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories.<br>FILE_ATTRIBUTE_HIDDEN The file is hidden. It is not to be included in an ordinary directory listing.<br>FILE_ATTRIBUTE_NORMAL The file has no other attributes set. This attribute is valid only if used alone.<br>FILE_ATTRIBUTE_OFFLINE The data of the file is not immediately available. Indicates that the file data has been physically moved to offline storage.<br>FILE_ATTRIBUTE_READONLY The file is read only. Applications can read the file but cannot write to it or delete it.<br>FILE_ATTRIBUTE_SYSTEM The file is part of or is used exclusively by the operating system.<br>FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
 
够清楚了吧,是不是还需要翻译一下?
 
The attributes can be one or more of the following values: <br><br>Value Meaning<br>FILE_ATTRIBUTE_ARCHIVE The file or directory is an archive file or directory. Applications use this flag to mark files for backup or <br>removal.<br>FILE_ATTRIBUTE_COMPRESSED <br>The file or directory is compressed. For a file, this means that all <br>of the data in the file is compressed. For a directory, this means <br>that compression is the default for newly created files and <br>subdirectories.<br><br>FILE_ATTRIBUTE_DIRECTORY The "file or directory" is a directory.<br><br>FILE_ATTRIBUTE_HIDDEN The file or directory is hidden. It is <br>not included in an ordinary directory listing.<br><br>FILE_ATTRIBUTE_NORMAL The file or directory has no other <br>attributes set. This attribute is valid only if used alone.<br><br>FILE_ATTRIBUTE_OFFLINE The data of the file is not immediately <br>available. Indicates that the file data has been physically moved to <br>offline storage.<br><br>FILE_ATTRIBUTE_READONLY The file or directory is read-only. <br>Applications can read the file but cannot write to it or delete it. <br>In the case of a directory, applications cannot delete it.<br><br>FILE_ATTRIBUTE_SYSTEM The file or directory is part of, or is <br>used exclusively by, the operating system.<br>FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary <br>storage. File systems attempt to keep all of the data in memory for <br>quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is<br>no longer needed.<br>&nbsp;<br><br>
 
多人接受答案了。
 
后退
顶部