网站首页  词典首页

请输入您要查询的函数:

 

术语 getdiskfreespaceex
释义 GetDiskFreeSpaceEx
语法:
C++
BOOL WINAPI GetDiskFreeSpaceEx(
__in_opt LPCTSTR lpDirectoryName,
__out_opt PULARGE_INTEGER lpFreeBytesAvailable,
__out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
__out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
GetDiskFreeSpaceEx函数
获取信息的空间,可以用磁盘卷,这是总面积数额,自由的空间总量,以及可用空间的,是与调用线程相关的用户总量。
参数
lpDirectoryName [中,可选]
磁盘上的目录。
如果该参数为NULL,则函数使用当前磁盘的根目录。
如果这个参数是一个UNC名称,它必须包括一个尾部反斜杠例如,“\\ \\ myServer的\\ MyShare \\”。
此参数没有指定磁盘上的根目录。该函数接受一个磁盘上的任何目录。
调用应用程序必须有此目录FILE_LIST_DIRECTORY访问权限。
lpFreeBytesAvailable [指出,可选]
一个变量,它接收的磁盘上可向谁是与调用线程相关的用户自由的总字节数的指针。
此参数可以为NULL。
如果每个用户正在使用的配额,此值可能低于自由字节磁盘上的总人数。
lpTotalNumberOfBytes [指出,可选]
一个变量,它接收的磁盘上可向谁是与调用线程相关的用户的总字节数的指针。
此参数可以为NULL。
如果每个用户正在使用的配额,这个值可能低于字节的磁盘上的总人数。
要确定磁盘或卷,请使用IOCTL_DISK_GET_LENGTH_INFO的字节总数。
lpTotalNumberOfFreeBytes [指出,可选]
一个变量,它接收磁盘上的自由的总字节数的指针。
此参数可以为NULL。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零(0)。为了获得更多错误信息,调用GetLastError。
备注
这个函数获得的值类型ULARGE_INTEGER。不要截断这些值到32位。
该GetDiskFreeSpaceEx函数返回0(0为lpTotalNumberOfFreeBytes和要求lpFreeBytesAvailable所有的CD),除非该磁盘是在CD - RW驱动器不成文的光盘。
符号链接的行为,如果路径指向一个符号链接,操作上的目标进行。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetDiskFreeSpaceExW(Unicode)和GetDiskFreeSpaceExA(ANSI)的
参见
磁盘管理功能
GetDiskFreeSpace
GetModuleHandle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetDiskFreeSpaceEx Function
Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread.
Syntax
C++
BOOL WINAPI GetDiskFreeSpaceEx(
__in_opt LPCTSTR lpDirectoryName,
__out_opt PULARGE_INTEGER lpFreeBytesAvailable,
__out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
__out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
Parameters
lpDirectoryName [in, optional]
A directory on the disk.
If this parameter is NULL, the function uses the root of the current disk.
If this parameter is a UNC name, it must include a trailing backslash, for example, "\\\\MyServer\\MyShare\\".
This parameter does not have to specify the root directory on a disk. The function accepts any directory on a disk.
The calling application must have FILE_LIST_DIRECTORY access rights for this directory.
lpFreeBytesAvailable [out, optional]
A pointer to a variable that receives the total number of free bytes on a disk that are available to the user who is associated with the calling thread.
This parameter can be NULL.
If per-user quotas are being used, this value may be less than the total number of free bytes on a disk.
lpTotalNumberOfBytes [out, optional]
A pointer to a variable that receives the total number of bytes on a disk that are available to the user who is associated with the calling thread.
This parameter can be NULL.
If per-user quotas are being used, this value may be less than the total number of bytes on a disk.
To determine the total number of bytes on a disk or volume, use IOCTL_DISK_GET_LENGTH_INFO .
lpTotalNumberOfFreeBytes [out, optional]
A pointer to a variable that receives the total number of free bytes on a disk.
This parameter can be NULL.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero (0). To get extended error information, call GetLastError .
Remarks
The values obtained by this function are of the type ULARGE_INTEGER . Do not truncate these values to 32 bits.
The GetDiskFreeSpaceEx function returns zero (0) for lpTotalNumberOfFreeBytes and lpFreeBytesAvailable for all CD requests unless the disk is an unwritten CD in a CD-RW drive.
Symbolic link behavior—If the path points to a symbolic link, the operation is performed on 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 namesGetDiskFreeSpaceExW (Unicode) and GetDiskFreeSpaceExA (ANSI)
See Also
Disk Management Functions
GetDiskFreeSpace
GetModuleHandle
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364937(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 11:25:06