Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

_setmaxstdio

Sets a maximum for the number of simultaneously open files at the stdio level.

int _setmaxstdio(
   int newmax 
);

Parameter

newmax
New maximum for number of simultaneously open files at the stdio level.

Return Value

Returns newmax if successful; –1 otherwise.

Remarks

The _setmaxstdio function changes the maximum value for the number of files that may be simultaneously open at the stdio level.

C run-time I/O now supports many more open files on Win32 platforms than in previous versions. Up to 2,048 files may be open simultaneously at the lowio level (that is, opened and accessed by means of the _open, _read, _write, and so forth family of I/O functions). Up to 512 files may be open simultaneously at the stdio level (that is, opened and accessed by means of the fopen, fgetc, fputc, and so forth family of functions). The limit of 512 open files at the stdio level may be increased to a maximum of 2,048 by means of the _setmaxstdio function.

Because stdio-level functions, such as fopen, are built on top of the lowio functions, the maximum of 2,048 is a hard upper limit for the number of simultaneously open files accessed through the C run-time library.

Note   This upper limit may be beyond what is supported by a particular Win32 platform and configuration.

Requirements

Routine Required header Compatibility
_setmaxstdio <stdio.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

Example

See _getmaxstdio for an example of using _setmaxstdio.

See Also

Stream I/O Routines | Run-Time Routines and .NET Framework Equivalents

Show:
© 2014 Microsoft. All rights reserved.