VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 当前系统目录
发表评论(0)作者:, 平台:, 阅读:9521, 日期:2000-03-12
声明:

Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

例子:

Dim S As String * 80, Length As Long

Dim WinPath As String, SysPath As String

Length = GetWindowsDirectory(S, Len(S))

WinPath = Left(S, Length)

Length = GetSystemDirectory(S, Len(S))

SysPath = Left(S, Length)


WinPath 为 Windows 的所在目录,SysPath 为 System 所在目录。