Hi guys

i´m using these API function to find dir \Temp\ in Windows NT

[code]
Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nbufferlength As Long, ByVal ipbuffer As String) As Long

Public Const MAX_PATH = 260
[code]

[code]
Public Function GetTmpPath()
Dim strfolder As String
Dim lngResult As String

strfolder = String(MAX_PATH, 0)
lngResult = GetTempPath(MAX_PATH, strfolder)

If lngResult <> 0 Then
GetTmpPath = Left(strfolder, InStr(strfolder, Chr(0), -1))
Else
GetTmpPath = ""
End If
End Function
[code]


When i click it occurs a run-time error 13 Type mismatch

[code]
Private Sub Command3_Click()
Call MsgBox("O caminho da Temp " & GetTmpPath, 64+vbInformation)

[code]

Any Help

Thanks