Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Win 2 API - <b>gettempfilename</b> create temporary filename http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetTempFileName      Create Temporary Filename

int GetTempFileName(cDriveLetter, lpPrefixString, wUnique, lpTempFilename)
BYTE cDriveLetter; /* or zero for current drive */
LPSTR lpPrefixString; /* Beginning of filename */
WORD wUnique; /* See below */
LPSTR lpTempFilename; /* Where to put filename */

Returns:    Numeric portion or wUnique.

Note:       Filename is built as shown:

             +----------------------------- Fixed portions
        Drive:\TmpPath\~PrefixUUUU.TMP
        +---+  +-----+  +----++--+        +--------------------------+
          |       |       |    +----------| wUnique or unique number |
          |       |       |               | based on system time     |
          |       |       |               +--------------------------+
          |       |       |          +----------------+
          |       |       +----------| lpTempFilename |
          |       |                  +----------------+
          |       |      +--------------------------------+
          |       +------| From TEMP Environment Variable |
          |              +--------------------------------+
          |      +---------------------------------------+
          +------| From TEMP if TEMP includes a drive or |
                 | hard disk.                            |
                 +---------------------------------------+

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson