Windows temporary file functions

Source: Internet
Author: User
Tags tmp file

Gettemppath
Function prototype:DWORD gettemppath ( DWORDCcbuffer, Lptstr Lpszbuffer);
Gettempfilename: generate or create a temporary file
Function prototype:Uint gettempfilename ( LpctstrLppathname, LpctstrLpprefixstring, UintUunique, LptstrLptempfilename);
Parameter: ① directory for saving temporary files
② Name of the new temporary file
③ Name of the new temporary file (the final temporary file name will be combined according to parameters 2 and 3, and parameter 3 will be converted to hexadecimal format ).
If you specifyNumber, A new file name is generated and saved in parameter 4, but no file is created.0, A new file name combining numbers and parameter 2 is randomly generated and the XXX. tmp file is created.
④ Save the new temporary file name. To ensure that the buffer is long enough, set the buffer size to max_path.

The gettempname function is not clear.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.