Home |
Function RTFMakeTempFileName |
Function RTFMakeTempFileNameRTFMakeTempFileName creates a file with a unique name: int RTFMakeTempFileName(const char * DirName, char * FileName, UINT MaxLength); ParametersDirNamePointer to the name of the directory in which the file shall be created. For the current directory, use ".". FileNamePointer to a buffer to receive the full path and file name of the file to be created. MaxLengthSpecifies the size in bytes of the buffer referenced by parameter FileName. It is recommended to use a buffer with RTF_MAX_PATH (260) bytes length. return valueIf the function succeeds, the return value is RTF_NO_ERROR and the created file's name has been copied to the supplied buffer. If the function fails, the return value is a negative error code. This function will generate a short file name consisting of a hexadecimal string derived from the current date and time and with extension ".TMP". If a file with this name already exists, the file name is modified until a unique name is found. This file is then created with current file size and allocated file size zero and no attributes set.
|