13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GetTempFileNameParameters cDriveLetter BYTE Specifies the suggested drive for the temporaryfilename. If cDriveLetter is zero, the default drive is used.Return valueCommentsIpPrefixStringwUniqueLPSTR Points to a null-terminated character string to beused as the temporary filename prefix. This string mustconsist of characters in the OEM-defined character set.WORD Specifies an unsigned short integer.IpTempFileName LPSTR Points to the buffer that is to receive thetemporary filename. This string consists of characters inthe OEM-defined character set. This buffer should be atleast 144 bytes in length to allow sufficient room for thepathname.The return value specifies a unique numeric value used in the temporaryfilename. If a nonzero value was given for the wUnique parameter, thereturn value specifies this same number.To avoid problems resulting from converting OEM character an string toan ANSI string, an application should call the _Iopen function to createthe temporary file.The GetTempFileName function uses the suggested drive letter forcreating the temporary filename, except in the following cases:• If a hard disk is present, GetTempFileName always uses the drive letterof the first hard disk.• Otherwise, if a TEMP environment variable is defined and its valuebegins with a drive letter, that drive letter is used.If the TF _FORCEDRIVE bit of the cDriveLetter parameter is set, the aboveexceptions do not apply. The temporary filename will always be createdin the current directory of the drive specified by cDriveLetter, regardless ofthe presence of a hard disk or the TEMP environment variable.If the wUnique parameter is zero, GetTempFileName attempts to form aunique number based on the current system time. If a file with theresulting filename exists, the number is increased by one and the test forexistence is repeated. This continues until a unique filename is found;GetTempFileName then creates a file by that name and closes it. Noattempt is made to create and open the file when wUnique is nonzero.GetTextAlignSyntaxWORD GetTextAlign(hDC)352 Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!