i created a small application that just ShellExecutes a HTML file and then closes again that's like only 2 lines of real coding. when i compile it the EXE is like 5.5 kb, i think it's too big for something so small..(cant PEPACK it either) is it possible to compile it as smallest as possible?
Posted on 2001-05-13 13:30:00 by newbie
I'm curious about what is getting linked into the exe. Maybe you could look at it in hex-dump to get an idea of how to make it smaller. Tiny exe's for Win95 can be as little as 3 sectors (1 sector is 512 bytes) or 4 sectors if you include simple resources like an icon. In NT the exe can be smaller -- a multiple of 32 rather than 512 bytes. Larry
Posted on 2001-05-13 13:41:00 by Larry Hammick
erm, read the PE specs - every PE file has the headers first of all - MZ, PE, import table, etc. in your case there's a data section, which you probably didn't merge into the code section. every section has an alignment size which makes it even bigger. right now the minimum size for a program (that can run on win9x) is something like 1kb. it can get smaller but then it won't run on 9x, due to alignment problems. if you want to know how to make your program that small, just check the ml/link switches. what you should basically do is merge the code/data/import sections if they're seperate, replace the stub and adjust the alignment size. good luck. imo 5kb is good enough, doesn't really make much difference if you get it down to 1kb.
Posted on 2001-05-14 11:19:00 by fresh