Microsoft KB Archive/108454

{|
 * width="100%"|

MS-DOS Error 24 ("Too Many Files Open") Loading Add-in (.WLL)

 * }

Q108454

-

The information in this article applies to:


 * Microsoft Word for Windows, version 6.0

-

SYMPTOMS
When you load an add-in program (.WLL file) that opens a file in Word for Windows, the following MS-DOS error message may occur:

Error 24: Too many files open

This happens regardless of your SHARE, FILES, or BUFFERS settings. In some cases, only two Word temporary (TMP) files may use 12 file handles.

CAUSE
An add-in program quickly exhausts file handles (which results in the above MS-DOS error message) if you created the add-in using run-time C programming language file routines. This happens because when you load an add-in program created using run-time C routines, Word does not execute the initial run-time C startup code, so any routines that require statics loaded by this code do not run correctly. This is a design feature of Word.

RESOLUTION
You must create your add-in programs using standard Microsoft Windows File Open and file manipulation routines instead of run-time C routines. For information about creating add-ins and .WLL files for Word, see Appendix C of the "Microsoft Word Developer's Kit."