[API]
GetTempPathA
GetTempPathW

[INCLUDE]
TemporaryMemory
PeekS

[CODE]
Public Function GetTempPath() As String
  Dim xLong1 As Long
  
  If IsUnicode Then
    xLong1 = GetTempPathW(ptrTempSizeXW, ptrTemp)
    Else
    xLong1 = GetTempPathA(ptrTempSizeXW, ptrTemp)
    End If
  If Not xLong1 = 0& And xLong1 < 256& Then
    GetTempPath = PeekS(ptrTemp, xLong1)
    End If
  End Function