I do it via Windows API function GetTempPath:
It works good enough for me. Though I am wondering if there is some built-in VB function to get TEMP dir?
regards,
rydel n23
Code:
Const MAX_PATH = 255
Private Declare Function GetTempPath Lib "kernel32" _
Alias "GetTempPathA" (ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long
Public Function GetTempDir() As String
Dim sRet As String, lngLen As Long
'create buffer
sRet = String(MAX_PATH, 0)
lngLen = GetTempPath(MAX_PATH, sRet)
If lngLen = 0 Then err.Raise err.LastDllError
GetTempDir = Left$(sRet, lngLen)
End Function
It works good enough for me. Though I am wondering if there is some built-in VB function to get TEMP dir?
regards,
rydel n23