Re: How to change the .exe file size ?

From: Gary Chanson (gchanson_at_No.Spam.TheWorld.net)
Date: 12/07/04

  • Next message: Norm Dresner: "Re: How to find a leaky Win16 program?"
    Date: Tue, 7 Dec 2004 07:14:13 -0500
    
    

    "Peter Liu" <Peter Liu@discussions.microsoft.com> wrote in message
    news:C089749A-A009-43AC-B2F9-C48B8F3E2622@microsoft.com...
    > Is there any tool that can change the size of a exe file compiled by the
    > Visual C++ 6.0 ?
    >
    > For example, the original file size of old.exe is 99 bytes and I want to
    > make it 100 byte by pading 1 byte to the old.exe.
    >
    > I have tried the following:
    > copy /b old.exe+1.bin/b new.exe /b
    >
    > where old.exe is the original application file of size 99 bytes.
    > 1.bin is a binary file of 1 byte
    > new.exe is old.exe padded with 1 extra byte at the end. its size is 100
    > bytes now.
    >
    > After that, I can run new.exe and its behavior is the same as old.exe.
    >
    > However, I don't know if there is any side-effect of doing this.

        There should be no side effects of doing this.

    > Besides, is there any information on the formation of a exe file ?

        Look up "portable executable common object file format" in MSDN.

    -- 
    -GJC [MS Windows SDK MVP]
    -Software Consultant (Embedded systems and Real Time Controls)
    - http://www.mvps.org/ArcaneIncantations/consulting.htm
    -gchanson@mvps.org
    

  • Next message: Norm Dresner: "Re: How to find a leaky Win16 program?"

    Relevant Pages


    Loading