|
Option Compare Database
Declare Function GetSystemDefaultLCID Lib "KERNEL32" () As Long
Declare Function GetWindowsDirectory Lib "KERNEL32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public syspath As String
Public AppTitle As String
Option Explicit
'获得windows系统目录
Function WindowsDirectory() As String 'get windows directory
Dim WinPath As String
Dim temp
WinPath = String(145, Chr(0))
temp = GetWindowsDirectory(WinPath, 145)
WindowsDirectory = Left(WinPath, InStr(WinPath, Chr(0)) - 1)
syspath = WindowsDirectory
End Function
|
|