如何获取存储卡的总容量,可用容量和文件夹的大小

fanalty123 2008-12-29 10:24:35
如题!VC上可以用GetDiskFreeSpaceEx,但是在wince上则没有这个函数!
...全文
164 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Seven_zhangxw 2008-12-31
  • 打赏
  • 举报
回复
This function obtains the following information about the amount of space available on a disk volume: the total amount of space, the total amount of free space, and the amount of free space available to the user associated with the calling thread.

BOOL GetDiskFreeSpaceEx(
LPCWSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
Parameters
lpDirectoryName
[in] Pointer to a null-terminated string that specifies a directory on the specified disk. This string can be a Universal Naming Convention (UNC) name.
If lpDirectoryName is NULL, the GetDiskFreeSpaceEx function obtains information about the object store.

Note lpDirectoryName does not have to specify the root directory on a disk. The function accepts any directory on the disk.
lpFreeBytesAvailableToCaller
[out] Pointer to a variable to receive the total number of free bytes on the disk that are available to the user associated with the calling thread.
lpTotalNumberOfBytes
[out] Pointer to a variable to receive the total number of bytes on the disk that are available to the user associated with the calling thread.
lpTotalNumberOfFreeBytes
[out] Pointer to a variable to receive the total number of free bytes on the disk.
This parameter can be NULL.

Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks
The values obtained by this function are of type ULARGE_INTEGER. Be sure not to truncate these values to 32 bits.

Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

fanalty123 2008-12-29
  • 打赏
  • 举报
回复
这个真的没有人知道吗?
ljkever_2008 2008-12-29
  • 打赏
  • 举报
回复
有么?
91program 2008-12-29
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 singlerace 的回复:]
WINCE上有GetDiskFreeSpaceEx
[/Quote]
singlerace 2008-12-29
  • 打赏
  • 举报
回复
WINCE上有GetDiskFreeSpaceEx

19,523

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧