Get Windows Temp PathThis is a featured page

This routine will return the path to the windows temp path.

First you need to create the pointer to the windows dll.
Step 1.Log into the SYSPROG account

Step 2. Add the following line to the end of the DLL_KERNEL32 record in SYSPROCS

UINT STDCALL GetTempPathA(UINT,LPCHAR) AS GETTEMPPATH

Step 3. Save this

Step 4. On the EXEC line of the editor or in the System Monitor, type the following

Run DECLARE_FCNS "DLL_KERNEL32"

Your new windows function will be be defined and ready to use.

Below is a code snipit to show you how to call the GetTempPath function

declare function getWindowsTempDir

TempDir = str(' ',255) ;* Initialise the TempDir variable ready to send to GetTempPath Windows function
Val = GetTempPath(255,TempDir) ;* Determine the windows temp directory
TempDir = TempDir[1,Val] ;* Removed Null terminator

Attached is a function called getWindowsTempPath, which will return the windows temp path




zapher67
zapher67
Latest page update: made by zapher67 , Feb 10 2008, 5:23 PM EST (about this update About This Update zapher67 Rename - zapher67

No content added or deleted.

- complete history)
Keyword tags: directory os path temp windows
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.
Unknown File getWindowsTempPath v100.bas (Unknown File - 2k)
posted by zapher67   Feb 10 2008, 5:23 PM EST
basic+ source code version 1.00

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)