# Re: 如何找出现时window的system目录路径

Posted by 小刘 on December 23, 1997 at 17:22:09:

In Reply to: 如何找出现时window的system目录路径 posted by 初学者 on December 23, 1997 at 08:31:38:

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

程式
Dim WinSys As String * 128
WinSys = Left(WinSys, GetSystemDirectory(WinSys, Len(WinSys)))
传回值 WinSys 就是所需路径

Follow Ups: