网站首页  词典首页

请输入您要查询的函数:

 

术语 getcompressedfilesize
释义 GetCompressedFileSize
语法:
C++
DWORD WINAPI GetCompressedFileSize(
__in LPCTSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh
);
GetCompressedFileSize功能
检索的磁盘存储的实际字节数用来存储指定的文件。如果文件位于一个卷,支持压缩和压缩文件,得到的值是指定文件压缩后的大小。如果该文件的卷上的支持稀疏文件和文件位于一个稀疏文件,得到的值是指定文件稀疏的大小。
作为一个要执行此操作的事务操作,请使用GetCompressedFileSizeTransacted功能。
参数
lpFileName [in]
该文件的名称。
不要指定一个关于一nonseeking设备文件,如管道或通信设备,名称,因为它的文件大小没有任何意义。
lpFileSizeHigh [指出,可选]
高阶双字节值压缩文件的大小。函数的返回值是低位的压缩文件的大小DWORD中。
此参数可以是NULL如果高阶压缩文件的大小DWORD是没有必要的。 Files less than 4 gigabytes in size do not need the high-order DWORD.
返回值
如果函数成功,返回值是低位双字节值的磁盘存储的实际字节数用来存储指定的文件,如果lpFileSizeHigh不为NULL,函数放在高阶的,实际的DWORD值进入该DWORD指出,该参数。这是压缩文件压缩文件的大小,对noncompressed文件的实际文件的大小。
如果函数失败,lpFileSizeHigh为NULL,则返回值为INVALID_FILE_SIZE。为了获得更多错误信息,调用GetLastError。
如果返回值是INVALID_FILE_SIZE和lpFileSizeHigh是非空,应用程序必须调用GetLastError,以确定是否成功的函数(值为NO_ERROR)或失败(价值以外NO_ERROR)。
备注
应用程序可以决定是否卷压缩调用GetVolumeInformation,然后检查了FS_VOL_IS_COMPRESSED旗帜DWORD值的地位指出,该函数的lpFileSystemFlags参数。
如果该文件不支持的卷压缩或稀疏文件,或者如果该文件不是压缩或稀疏文件位于得到的值是实际文件的大小,由1至GetFileSize调用返回的值相同。
符号链接的行为,如果路径指向一个符号链接,该函数返回目标文件的大小。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetCompressedFileSizeW(Unicode)和GetCompressedFileSizeA(ANSI)的
参见
文件压缩和解压
文件管理函数
GetCompressedFileSizeTransacted
GetFileSize
GetVolumeInformation
符号链接
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetCompressedFileSize Function
Retrieves the actual number of bytes of disk storage used to store a specified file. If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value obtained is the sparse size of the specified file.
To perform this operation as a transacted operation, use the GetCompressedFileSizeTransacted function.
Syntax
C++
DWORD WINAPI GetCompressedFileSize(
__in LPCTSTR lpFileName,
__out_opt LPDWORD lpFileSizeHigh
);
Parameters
lpFileName [in]
The name of the file.
Do not specify the name of a file on a nonseeking device, such as a pipe or a communications device, as its file size has no meaning.
lpFileSizeHigh [out, optional]
The high-order DWORD of the compressed file size. The function's return value is the low-order DWORD of the compressed file size.
This parameter can be NULL if the high-order DWORD of the compressed file size is not needed. Files less than 4 gigabytes in size do not need the high-order DWORD.
Return Value
If the function succeeds, the return value is the low-order DWORD of the actual number of bytes of disk storage used to store the specified file, and if lpFileSizeHigh is non-NULL, the function puts the high-order DWORD of that actual value into the DWORD pointed to by that parameter. This is the compressed file size for compressed files, the actual file size for noncompressed files.
If the function fails, and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call GetLastError .
If the return value is INVALID_FILE_SIZE and lpFileSizeHigh is non-NULL, an application must call GetLastError to determine whether the function has succeeded (value is NO_ERROR) or failed (value is other than NO_ERROR).
Remarks
An application can determine whether a volume is compressed by calling GetVolumeInformation , then checking the status of the FS_VOL_IS_COMPRESSED flag in the DWORD value pointed to by that function's lpFileSystemFlags parameter.
If the file is not located on a volume that supports compression or sparse files, or if the file is not compressed or a sparse file, the value obtained is the actual file size, the same as the value returned by a call to GetFileSize .
Symbolic link behavior—If the path points to a symbolic link, the function returns the file size of the target.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetCompressedFileSizeW (Unicode) and GetCompressedFileSizeA (ANSI)
See Also
File Compression and Decompression
File Management Functions
GetCompressedFileSizeTransacted
GetFileSize
GetVolumeInformation
Symbolic Links
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364930(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:22:48