取得Disk Free Space与Total Space

bianxuemeng

bianxuemeng

2016-02-19 16:51

今天给大家分享的是由图老师小编精心为您推荐的取得Disk Free Space与Total Space,喜欢的朋友可以分享一下,也算是给小编一份支持,大家都不容易啊!

  

Private Declare Function GetDiskFreeSpace Lib "kernel32" _  Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _  lpSectorsPerCluster As Long, lpBytesPerSector As Long, _  lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long'Path = "c:" 指定Volume 代号, 如: c: d: e:Public Function GetFreeSpace(Byval Path as String) as LongDim aa As LongDim Path As StringDim SecPerClust As LongDim BytePerSec As Long, FreeClust As Long, totClust As LongPath = "c:" '指定Volume 代号, 如: c: d: e:aa = GetDiskFreeSpace(Path, SecPerClust, BytePerSec, FreeClust, totClust)GetFreeSpace = SecPerClust * BytePerSec * FreeClustEnd Function'Path = "c:" 指定Volume 代号, 如: c: d: e:Public Function GetTotalSpace(Byval Path as String) as LongDim aa As LongDim Path As StringDim SecPerClust As LongDim BytePerSec As Long, FreeClust As Long, totClust As Longaa = GetDiskFreeSpace(Path, SecPerClust, BytePerSec, FreeClust, totClust)GetTotalSpace = SecPerClust * BytePerSec * totClustEnd Function

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)
展开更多 50%)
分享

猜你喜欢

取得Disk Free Space与Total Space

编程语言 网络编程
取得Disk Free Space与Total Space

CSS文本:text-kashida-space

Web开发
CSS文本:text-kashida-space

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

X-Space(2):X-Space"搬家"三步走

PHP
X-Space(2):X-Space

取得Disk Volume Information

编程语言 网络编程
取得Disk Volume Information

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

CSS文本:white-space

Web开发
CSS文本:white-space

“Mu Space”便于携带的音乐枕头

平面设计 海报设计 广告设计 画报设计 签名设计 服装设计 名片设计 画册设计 版式设计 商标设计
“Mu Space”便于携带的音乐枕头

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

如何读取 Windows 工作列的大小及位置?

如何读取 Windows 工作列的大小及位置?

如何修改Window系统下PATH路径

如何修改Window系统下PATH路径
下拉加载更多内容 ↓