CeGetTempPath (RAPI)

This function gets the path to the directory designated for temporary files. CeGetTempPath is a remote application interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

DWORD CeGetTempPath( 
DWORD nBufferLength, 
LPWSTR lpBuffer);

Parameters

  • nBufferLength
    [in] Size of lpBuffer in characters.
  • lpBuffer
    [out] Long pointer to the buffer for the folder path.

Return Values

The return value is the length, in characters, 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.

If CeGetTempPath fails, the return value is 0. To determine if a function failed because of RAPI errors, call CeRapiGetError. To determine if a function failed because of non-RAPI errors, call CeGetLastError.

Remarks

The CeGetTempPath function gets the temporary file path as follows:

  1. The path specified by the TMP environment variable.

  2. The path specified by the TEMP environment variable, if TMP is not defined.

    Note that the concept of a current directory does not exist in Windows CE. The full path must be specified.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 2.0 and later Rapi.h    

See Also

CeGetLastError, CeRapiGetError

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.