Skip to content

WindowsApi:GetTempFileName

임시 파일명 획득.

Creates a name for a temporary file. If a unique file name is generated, an empty file is created and the handle to it is released; otherwise, only a file name is generated.

Syntax

UINT WINAPI GetTempFileName(
  _In_  LPCTSTR lpPathName,
  _In_  LPCTSTR lpPrefixString,
  _In_  UINT    uUnique,
  _Out_ LPTSTR  lpTempFileName
);

Remarks

The GetTempFileName function creates a temporary file name of the following form:

<path>\<pre><uuuu>.TMP

The following table describes the file name syntax.

Component

Meaning

<path>

Path specified by the lpPathName parameter

<pre>

First three letters of the lpPrefixString string

<uuuu>

Hexadecimal value of uUnique

See also