Microsoft KB Archive/25321

From BetaArchive Wiki

Using EXEHDR or EXEMOD to Change the Stack Size of .EXE


The information in this article applies to:

  • Microsoft EXEHDR for MS-DOS, versions 1.0, 2.01, 3.0, 3.1, 3.2
  • Microsoft EXEHDR for OS/2, versions 1.0, 2.01, 3.0
  • Microsoft EXEMOD for MS-DOS, versions 4.0, 4.02

The EXEHDR and EXEMOD utilities can be used to change the stack size of a program. EXEMOD is an older utility that runs only under MS-DOS.

To view the current size of the stack, no options are used. Both EXEHDR and EXEMOD will produce a table of information with a line such as the following:

Initial stack location: 0000:0800

The offset portion of this line gives the current stack size in hexadecimal notation. In this example, the stack size is set at 2K. If you wanted to change it to 4K, you could use the /STACK option of EXEHDR or EXEMOD in the following way:

EXEHDR /STACK:0x1000 file


EXEMOD file /STACK 1000

Additonal reference words: 1.00 3.00 3.10 3.20

Additional query words:

Keywords : kb16bitonly
Issue type :
Technology :

Last Reviewed: December 22, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.