Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.31 KB

GetTempPath.md

File metadata and controls

49 lines (34 loc) · 1.31 KB

Home

Function name : GetTempPath

Group: File Management - Library: kernel32


The GetTempPath function retrieves the path of the directory designated for temporary files


Code examples:

Creating a unique filename based on existing filename
Using the GetTempFileName
Locking and unlocking file of a VFP table

Declaration:

DWORD GetTempPath(
  DWORD nBufferLength,  // size of buffer
  LPTSTR lpBuffer       // path buffer
);  

FoxPro declaration:

DECLARE INTEGER GetTempPath IN kernel32;
	INTEGER   nBufferLength,;
	STRING  @ lpBuffer
  

Parameters:

nBufferLength [in] Specifies the size, in TCHARs, of the string buffer identified by lpBuffer.

lpBuffer [out] Pointer to a string buffer that receives the null-terminated string specifying the temporary file path. The returned string ends with a backslash, for example, C:\TEMP.


Return value:

If the function succeeds, the return value is the length of the string copied to lpBuffer, not including the terminating null character