Share via


CeGetTempPath

This function gets the path to the directory designated for temporary files. CeGetTempPath is a RAPI that enables an application that is running on a desktop computer to make function calls on a Microsoft® Windows® CE–based device.

STDAPI_(DWORD) CeGetTempPath(
  DWORD nBufferLength,
  LPWSTR lpBuffer 
);

Parameters

  • nBufferLength
    [in] Size of lpBuffer in characters.
  • lpBuffer
    [out] Reference to a wide string buffer that receives the null-terminated wide string specifying the temporary path. The returned string ends with a backslash (/).

Return Values

The return value is the length, in wide 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 whether a function failed because of RAPI errors, call CeRapiGetError. To determine whether 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.
  3. The current directory, if both TMP and TEMP are not defined.

Requirements

Pocket PC Platforms: Pocket PC 2000 and later
OS Versions: Windows CE 3.0 and later
Header: rapi.h
Library: rapi.lib

Send feedback on this topic to the authors.

© 2005 Microsoft Corporation. All rights reserved.