|
' API 関数定義
Private Declare Function GetWindowsDirectory Lib _
"kernel32" Alias "GetWindowsDirectoryA" ( _
ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
' Windowsのディレクトリを取得するサンプル
Public Function GetWinDir()
Dim strTemp As String * 256
Dim lngSize As Long
Dim strWinDir As String
lngSize = GetWindowsDirectory(strTemp, 256)
strWinDir = LeftB(strTemp, lngSize * 2)
GetWinDir = strWinDir
End Function
|