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

Last reviewed: July 17, 1997
Article ID: Q25321
1.00 2.01 3.00 3.10 3.20 | 1.00 2.01 3.00
MS-DOS                   | OS/2
kbtool

The information in this article applies to:

  • Microsoft EXEHDR for MS-DOS, versions 1.0, 2.01, 3.0, 3.1, and 3.2
  • Microsoft EXEHDR for OS/2, versions 1.0, 2.01, and 3.0
  • Microsoft EXEMOD for MS-DOS, versions 4.0 and 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

   -or-

   EXEMOD file /STACK 1000

Additonal reference words: 1.00 3.00 3.10 3.20

	
	


KBCategory: kbtool
KBSubcategory: TlsMisc
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.