Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Citrix and foxpro tmp files.
Message
From
26/10/2004 07:51:56
 
 
To
25/10/2004 11:24:01
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00954282
Message ID:
00954496
Views:
16
Below is a procedure that we use to find everyone's temp folder.

PROCEDURE FindGlobalTempPath
* Find our home directory. It won't always be on the C: drive. This code is
* lifted from the July 2001 FoxTalk in the "Reusable Tools: Going Ape Over the
* Win32 API" article. Returns a path for temp file storage, either on the
* local machine, or on the Citrix server if citrix client.
IF TYPE("globalTempPath")="U".OR.TYPE("globalTempPath")="L"
PUBLIC globalTempPath
globalTempPath = SPACE( 260 )
DECLARE INTEGER GetTempPath in Win32API integer nLength, string @szBuffer
GetTempPath( 260, @globalTempPath )
globalTempPath = ADDBS( LEFT(globalTempPath, AT(CHR(0), globalTempPath) - 1))
CLEAR DLLS
ENDIF
ENDPROC

We just make sure to call the procedure in the beginning of our setup code and then any time we want to save to a temporary file we use the globalTempPath varaible for placement.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform