Win32 - Get temp folder of current user

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Win32 - Get temp folder of current user

Post by BackupUser »

Code updated for 5.20+

Restored from previous forum. Originally posted by MrVainSCL.

Small code snip to get temp folder of current logged in user.

Code: Select all

; ------------------------------------------------------------
;
; PureBasic Win32 API - GetTempFolder - Example v1.0
;
; by MrVainSCL! aka Thorsten   21/Jan/2003    PB v3.51+
;
; ------------------------------------------------------------
;
result$ = Space(1024)
GetTempPath_(1024,result$)
;
MessageRequester("Official temp folder of the current user is:",result$,0)
End
;
; ------------------------------------------------------------



Requirements
Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, Windows 95.
Server: Included in Windows Server 2003¬ Windows 2000 Server, Windows NT Server.



greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...