Advertisement

OT: maximum .exe size

Started by September 07, 2001 10:21 AM
13 comments, last by penetrator 23 years, 5 months ago
Hi, just experimenting with programming and i noticed that if the .exe size exceeds 32mbytes, it works only on windows2000, while in windows Me / 98 i get an error message that the file is corrupt ! Somebody else got that ? glHorizon_Project

www.web-discovery.net

32MB is a huge executable. How''d you manage to pull that off? lots of resources compiled into the exe?

The largest executable file that I''ve seen was around 8MB that I can recall. If that is mainly code, then the project probably needs to be broken up into a few different dll''s and stuff. I wouldn''t be too surprised if there was some sort of limit, because, if I remember correctly, the earliest versions of DOS had an exe size limit.

J.W.
Advertisement
quote:
Original post by jwace81
I wouldn''t be too surprised if there was some sort of limit, because, if I remember correctly, the earliest versions of DOS had an exe size limit.



The largest executable you could have in DOS was 64 KB''s, and that was because it was a 16 bit OS. Now you''re able to (in theory) have an executable of over 2 GB''s. Although, an executable over 32 MB is huge! The largest I''ve seen is 35 MB (it worked in Win98 as well as Win2K), and that was a install file for a demo, I guess they didn''t want you to rip their data files.

[Resist Windows XP''s Invasive Production Activation Technology!]
Installers regularly have massive executables. 32 Megs shouldn''t be a problem, even in Win9x.


~~~~~~~~~~
Martee
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
quote:
The largest I''ve seen is 35 MB (it worked in Win98 as well as Win2K), and that was a install file for a demo, I guess they didn''t want you to rip their data files.


The executable itself wouldn''t have been 35mb - self-contained installation programs are generally just a small program with a large datafile appended to them.
Ive never seen an accual .exe that big


When you hit that point, i would break it into several .dll''s like someone else said.
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.
Advertisement
i have a resource which i compile into the exe: it is a .raw file of about 4Mbytes, but i don''t know which is the equivalent of:

char *pMap = (char *)LockResource(LoadResource(NULL, FindResource(NULL, MAKEINTRESOURCE(IDR_RAW), "RAW")));

to let me read the .raw file instead of compiling it into the .exe

glHorizon_Project



www.web-discovery.net


There''s this video codec called BINK that can make your video into an .exe with the player built in.

http://www.radgametools.com

I''ve seen executable made with this that have sizes of 100+ mb.
quote:

i have a resource which i compile into the exe: it is a .raw file of about 4Mbytes, but i don''t know which is the equivalent of:
char *pMap = (char *)LockResource(LoadResource(NULL, FindResource(NULL, MAKEINTRESOURCE(IDR_RAW), "RAW")));
to let me read the .raw file instead of compiling it into the .exe



Well, easy, in plain C that would be (''size'' is your raw file size)

char *pMap = (char *) malloc( size );
fp = fopen( "MYFILE.RAW", "rb" );
fread( pMap, 1, size, fp );
fclose( fp );

quote:

There''s this video codec called BINK that can make your video into an .exe with the player built in.

http://www.radgametools.com

I''ve seen executable made with this that have sizes of 100+ mb.



Remember what happened when you tried to run a windows program under DOS? a message of the likes of
"this program can only be run under windows, bugger off!!"

that was what is called a Stub, and its a quite small DOS/CONSOLE program that is appended at the beginin of all windows executables, so you can inform a user that the program wont run in DOS, so the computer doesnt crash trying to run the windows program.

the same principle is applied on self extracting EXE, video EXEs and so on, but this time the stub is actually the player or extractor that is applied to the Data segment.

now this will sound like an echo, but 32 MB for a different kind of exectable as the ones mentioned above is way too much, keep your big resources out of the executable (It just CANT be only code).

This topic is closed to new replies.

Advertisement