Microsoft KB Archive/50351

= DOC: mktemp Creates a Maximum of 27 Unique Filenames =

Article ID: 50351

Article Last Modified on 12/12/2003

-

APPLIES TO

 The C Run-Time (CRT), when used with:  Microsoft C Professional Development System 5.1

 Microsoft C Professional Development System 6.0

 Microsoft C Professional Development System 6.0a

 Microsoft C Professional Development System 6.0a</li></ul>

 Microsoft C/C++ Professional Development System 7.0</li></ul>

 Microsoft Visual C++ 1.0 Professional Edition</li></ul>

 Microsoft Visual C++ 1.5 Professional Edition</li></ul>

 Microsoft Visual C++ 2.0 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q50351

<div class="notice_section">

<div class="summary_section">

SUMMARY
In the Microsoft C online and printed documentation for the mktemp function, it is not clear exactly how many filenames mktemp can create. These references state the following:

When creating new names, mktemp uses, in order, &quot;0&quot; and the lowercase letters &quot;a&quot; to &quot;z&quot;.

This information is correct. However, the documentation fails to mention that these are the only filenames that are created. Any further calls to mktemp after these characters have been used will fail (that is, once &quot;z&quot; has been placed in the template). Therefore, the limit on the number of unique filenames that can be created by mktemp is 27.

NOTE: This problem was fixed in the Books On-line of Microsoft Visual C++, 32-bit Edition, version 4.0.

Additional query words: 1.00 1.50 2.00 4.00 5.10 6.00 6.00a 6.00ax 7.00

Keywords: kbcrt kbdocfix KB50351

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.