computer 版 (精华区)
发信人: windoe (为中国电信做贡献), 信区: program
标 题: VB:如何获得当前的Windows目录和System子目录?
发信站: 听涛站 (Fri Mar 10 19:09:14 2000), 转信
Windows API函数GetWindowsDirectory(),用于读取当前Windows目录。
?
Windows API函数GetWindowsDirectory(),用于读取当前Windows目录。
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirecto
ryA"" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Function GetWindowsDir() As String
Dim strBuf As String
strBuf = Space(80) '最大长度
If GetWindowsDirectory(strBuf, 80) > 0 Then
GetWindowsDir = UCase$(strBuf)
End If
End Function
--By Kammi's SuperPost General Version
--
夜中不能寐,起坐弹鸣琴。
薄帷鉴明月,清风吹我襟。
孤鸿号外野,翔鸟鸣北林。
徘徊将何见,忧思独伤心。
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.372毫秒