声明:
' 获取系统目录
public declare function getsystemdirectory lib 'kernel32' alias 'getsystemdirectorya' _
(byval lpbuffer as string, byval nsize as long) as long
' 获取windows目录
declare function getwindowsdirectory lib 'kernel32' alias 'getwindowsdirectorya' _
(byval lpbuffer as string, byval nsize as long) as long
调用:
' 检查系统目录
public function getsystempath() as string
dim p as string * 80
dim length as long
dim path as string
length = getsystem directory(p, len(p))
path = left(p, length)
getsystempath = path
end function
' 检查windows目录
public function getwindowspath() as string
dim p as string * 80
dim length as long
dim path as string
length = getwindows directory(p, len(p))
path = left(p, length)
getwindowspath = path
end function
【VB编程:获取系统目录和Windows目录】相关文章:
2022年河南省统一考试录用公务员安阳市职位第二批拟录用人员公示02-06
2021年安徽淮南市考试录用警察职位体能测评递补公告02-06
初二议论文:目标很重要_1000字02-06
2023山东公务员考试招录公告及解读汇总(各地市)02-06
播种习惯,收获命运作文02-06
2022重庆开州区从优秀村(社区)干部中招录公务员笔试、面试成绩公布表02-06
北京交通大学2023年推免研究生拟录取名单公示通知02-06
2025国考甘肃报名人数统计:各部门报名数据分析[截至10月15日16时]02-06
