473,480 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Strings in executables

Newbie here. Just got three questions.

1. Im working on a program where every byte counts. But a hex editor says
the EXE files strings are in what looks like unicode. How do I fix this?

2. Anyone tried messing with a VB output executable with a hex editor after
compilation to reduce space a bit? I was thinking my print lines have a lot
of CHR$(13) in them, if I were to replace that in the code with an easily
recognised character (éé) and then go through the file in hex replacing that
character in strings with the hex 0d0a, or whatever works, I can get a few
fewer bytes. Ive got to work on it with the editor anyway, its got a
self-check function which requires setting a few bytes in the file to its
compiled checksum.
Jul 17 '05 #1
5 1930
There was a tool I used, I think it was UPX. Can't remember, just serach for
it. It compresses/decompresses exe files

--
Regards
Dillon Mantle
"Goldenpi" <Go******@softhome.net> wrote in message
news:kC***********************@news-text.cableinet.net...
Newbie here. Just got three questions.

1. Im working on a program where every byte counts. But a hex editor says
the EXE files strings are in what looks like unicode. How do I fix this?

2. Anyone tried messing with a VB output executable with a hex editor after compilation to reduce space a bit? I was thinking my print lines have a lot of CHR$(13) in them, if I were to replace that in the code with an easily
recognised character (éé) and then go through the file in hex replacing that character in strings with the hex 0d0a, or whatever works, I can get a few
fewer bytes. Ive got to work on it with the editor anyway, its got a
self-check function which requires setting a few bytes in the file to its
compiled checksum.

Jul 17 '05 #2
That would mess up my viral detection. Anyway, the files so small a
compression program will add more than the size saved in overhead code. I
have done a little for compression through: Everything will be inspected
using a hex editor to make it as much a null-filled file as possible. Even
the icons mostly black. Current size 15.5k uncompressed, 5.9k in a zip file.

Is there a way to stop VB putting in those metatags. Company, version,
original filename, etc?

"Dillon Mantle" <di*****@dasolutions.co.za> wrote in message
news:rI********************@is.co.za...
There was a tool I used, I think it was UPX. Can't remember, just serach for it. It compresses/decompresses exe files

--
Regards
Dillon Mantle
"Goldenpi" <Go******@softhome.net> wrote in message
news:kC***********************@news-text.cableinet.net...
Newbie here. Just got three questions.

1. Im working on a program where every byte counts. But a hex editor says the EXE files strings are in what looks like unicode. How do I fix this?

2. Anyone tried messing with a VB output executable with a hex editor

after
compilation to reduce space a bit? I was thinking my print lines have a

lot
of CHR$(13) in them, if I were to replace that in the code with an easily recognised character (éé) and then go through the file in hex replacing

that
character in strings with the hex 0d0a, or whatever works, I can get a few fewer bytes. Ive got to work on it with the editor anyway, its got a
self-check function which requires setting a few bytes in the file to its compiled checksum.


Jul 17 '05 #3
xyz
It seems to me that if the size of the code is so important, you are
wasting your time with Visual Basic. Code in C. I am sure that a the
same functionality will take 1/10th of the space.

Besides, by the time you are done manually changing bytes with hex
editors, you will have code that nobody will be able to maintain.

xyz

Jul 17 '05 #4
xyz
Why don't you store the print messages as an ASCII file. Read it in at
initialization. Your program will only need to know the line number
to print out for each message.

xyz

Jul 17 '05 #5

"xyz" <xy*@mailinator.com> wrote in message
news:3p********************************@4ax.com...
It seems to me that if the size of the code is so important, you are
wasting your time with Visual Basic. Code in C. I am sure that a the
same functionality will take 1/10th of the space.
Yes. Shame I dont know enough C, but ive only worked with GCC command line,
and im not much good with that.

Besides, by the time you are done manually changing bytes with hex
editors, you will have code that nobody will be able to maintain.


As opposed to my ordinary code, which perhaps 1% of programers could read. I
use magic number systems a lot, and my variable naming system is unusual.
Its not unusual to see something like "xnegypospicboxa" as an object name.
Anyway, noones going to be maintaining this code except me.
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1688
by: j_mckitrick | last post by:
Does it make sense to use doc strings rather than #-comments for a standalone Python app? If the classes aren't going to be re-used or imported, do they need them?
9
1397
by: mac | last post by:
when a c program is compiled using 'gcc test.c' 'cannot create c executables is thrown' I cannot able to figure out the problem could anyone help me. Thanks.
20
6139
by: | last post by:
Back in the Old days, I compile a C++ executable, copy the dll's used by this executable to the same folder. Go to another computer, copy that folder locally, double click on the exe file and off...
2
1821
by: ven | last post by:
I have used C# binary formatter to serialize and deserialize a data structure. However, for the same data format( used by the first executable, the same *.CS files), the second executable gives an...
5
1401
by: VJ | last post by:
I have one VB.NET project, that outputs a "Mycomapny.exe" everytime I do a build. But I need it to output 4 different executables everytime I build. How do I archive this. I am looking at the...
1
1710
by: Water Cooler v2 | last post by:
I have a Windows Service I am writing in C# and a set of, let us say three, other executables written in C# (mostly console applications). I want that the Windows Service must do so every few...
0
992
by: A W | last post by:
Hello, I am encountering the following scenario while compiling a project under Visual Studio 2005 with the floating point model set as precise. Two executables A and B share a common dll C. ...
4
5226
by: ravit | last post by:
I have built my gdb-6.7.1 yesterday on my AIX 5.3 64 bit machine. my gcc is gcc3.3.2 and tried debugging 64 bit executables generated by gcc, working fine. debugging session ends successfully....
6
1642
by: =?Utf-8?B?Q2hhcmxlcyBS?= | last post by:
I have two different executables that I want to build w/ the same source but in 2 different compilers, vs60 and vs2008. I have 2 different configurations w/ different options etc, but I want one...
0
6915
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.