This example returns the windows temp folder of the current user.
Related To:
Get Special Windows Folders (http://www.underwaredesign.com/forums/index.php?topic=2792.0)
[pbcode]
LinkDll "kernel32"
GetTempPathA(nSize,lpBuffer) alias "GetTempPathA" as integer
EndLinkDll
Function GetTempPath()
// Alloc a bank of 1024 bytes
Size=1024
ThisBank=newbank(Size)
Ptr=GetBankPtr(thisBank)
Status=GetTempPathA(Size,ptr)
if Status
Path$=PeekString(ptr,0) ; peek a null termed string
endif
Deletebank ThisBank
EndFunction path$
//
print GetTempPath()
Sync
waitkey
[/pbcode]