GetTempPath

This function retrieves the path of the directory designated for temporary files.

DWORD GetTempPath (
LPTSTR nBufferLength, 
LPCTSTR 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.

Return Values

If the function succeeds, the return value is the length, in TCHARs, of the string copied to lpBuffer, not including the terminating null character. If the return value is greater than nBufferLength, the return value is the size of the buffer required to hold the path.

To get extended error information, call GetLastError.

Remarks

None.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.11 Winbase.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetLastError

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.