Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
StringTable.res
Old
  (#1)
Geoff Turner
Guest
 
Posts: n/a
Default StringTable.res - 06-04-2007, 08:51 AM

Hi all,
I'm trying to create a string table for a project. In fact it's to tidy
up an old project.
So I have all the strings, and just need to create a table. But I don't want
to have to retype
the strings all over again since there are ~150.
So I want to deveope a quick progra, so I can cut/paste the strings into a
text file, and have
a program ( which I can write ) to read the text file and create a res file.
Now the problem: Having looked at a stringtable res file, I can see the
format of the file, but
there is a few bytes at the start of the file, information of sorts, that I
cannot work out.They
/don't/ appear to have anything to do with the file lenght, start of the
string table etc, but I
could be wrong about this.
Question: Can anybody help me to decode these bytes, or point me in a
direction where I
might find out?
Below, I have included a small complete stringtable res file.
TIA
Geoff Turner.

Sample dump of a RES file. File length: 632 bytes

---------------------\/ \/ \/ Can't work this bit out \/ \/
\/----------------------------------
000000 00 00 00 00 20 00 00 00 FF FF 00 00 FF FF 00 00 úúúú
úúúúúúúúúúú
000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
úúúúúúúúúúúúúúúú
000020 6A 00 00 00 20 00 00 00 FF FF 06 00 FF FF 07 00 júúú
úúúúúúúúúúú
000030 00 00 00 00 00 00 09 08 00 00 00 00 00 00 00 00
úúúúúúúúúúúúúúúú
000040 00 00 00 00 00 00 00 00 00 00

--------------------\/ \/ \/ \/ This is easy \/ \/
\/-----------------------------------------

04 00
54 00 68 00 úúúúúúúúúúúúTúhú
000050 69 00 73 00 02 00 69 00 73 00 01 00 61 00 03 00
iúsúúúiúsúúúaúúú
000060 6E 00 65 00 77 00 06 00 73 00 74 00 72 00 69 00
núeúwúúúsútúrúiú
000070 6E 00 67 00 05 00 74 00 61 00 62 00 6C 00 65 00
núgúúútúaúbúlúeú
000080 04 00 74 00 68 00 61 00 74 00 03 00 63 00 61 00
úútúhúaútúúúcúaú
000090 6E 00 02 00 62 00 65 00 05 00 61 00 64 00 64 00
núúúbúeúúúaúdúdú
0000A0 65 00 64 00 02 00 61 00 73 00 00 00 88 01 00 00
eúdúúúaúsúúúúúúú
0000B0 20 00 00 00 FF FF 06 00 FF FF 08 00 00 00 00 00
úúúúúúúúúúúúúúú
0000C0 00 00 09 08 00 00 00 00 00 00 00 00 08 00 72 00
úúúúúúúúúúúúúúrú
0000D0 65 00 71 00 75 00 69 00 72 00 65 00 64 00 14 00
eúqúuúiúrúeúdúúú
0000E0 54 00 68 00 65 00 20 00 74 00 65 00 78 00 74 00 Túhúeú
útúeúxútú
0000F0 20 00 73 00 65 00 65 00 6D 00 73 00 20 00 74 00 úsúeúeúmúsú
útú
000100 6F 00 20 00 62 00 65 00 12 00 70 00 75 00 74 00 oú
úbúeúúúpúuútú
000110 20 00 69 00 6E 00 74 00 6F 00 20 00 62 00 6C 00 úiúnútúoú
úbúlú
000120 6F 00 63 00 6B 00 73 00 20 00 6F 00 66 00 24 00 oúcúkúsú
úoúfú$ú
000130 73 00 6F 00 20 00 6D 00 61 00 6E 00 79 00 20 00 súoú
úmúaúnúyú ú
000140 63 00 68 00 61 00 72 00 61 00 63 00 74 00 65 00
cúhúaúrúaúcútúeú
000150 72 00 73 00 20 00 74 00 68 00 61 00 74 00 20 00 rúsú
útúhúaútú ú
000160 69 00 73 00 20 00 79 00 65 00 74 00 20 00 74 00 iúsú úyúeútú
útú
000170 6F 00 20 00 62 00 65 00 1C 00 66 00 6F 00 75 00 oú
úbúeúúúfúoúuú
000180 6E 00 64 00 20 00 61 00 6E 00 64 00 20 00 77 00 núdú úaúnúdú
úwú
000190 68 00 61 00 74 00 20 00 61 00 62 00 6F 00 75 00 húaútú
úaúbúoúuú
0001A0 74 00 20 00 61 00 6C 00 6C 00 20 00 74 00 68 00 tú úaúlúlú
útúhú
0001B0 65 00 0C 00 6F 00 74 00 68 00 65 00 72 00 20 00
eúúúoútúhúeúrú ú
0001C0 73 00 74 00 75 00 67 00 67 00 3F 00 1C 00 43 00
sútúuúgúgú?úúúCú
0001D0 61 00 6E 00 20 00 49 00 20 00 77 00 72 00 69 00 aúnú úIú
úwúrúiú
0001E0 74 00 65 00 20 00 6F 00 75 00 74 00 20 00 74 00 túeú úoúuútú
útú
0001F0 65 00 78 00 74 00 20 00 61 00 6E 00 64 00 20 00 eúxútú
úaúnúdú ú
000200 75 00 73 00 65 00 1E 00 56 00 42 00 20 00 74 00 uúsúeúúúVúBú
útú
000210 6F 00 20 00 63 00 6F 00 6D 00 70 00 69 00 6C 00 oú
úcúoúmúpúiúlú
000220 65 00 20 00 61 00 20 00 72 00 65 00 73 00 6F 00 eú úaú
úrúeúsúoú
000230 75 00 72 00 63 00 65 00 20 00 66 00 69 00 6C 00 uúrúcúeú
úfúiúlú
000240 65 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00
eú?úúúúúúúúúúúúú
000250 00 00 00 00
úúúú


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: StringTable.res
Old
  (#2)
J French
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:51 AM

On Mon, 24 Nov 2003 11:38:25 -0000, "Geoff Turner"
<EMAIL REMOVED> wrote:

>Hi all,
> I'm trying to create a string table for a project. In fact it's to tidy
>up an old project.
>So I have all the strings, and just need to create a table. But I don't want
>to have to retype
>the strings all over again since there are ~150.
>So I want to deveope a quick progra, so I can cut/paste the strings into a
>text file, and have
>a program ( which I can write ) to read the text file and create a res file.
>Now the problem: Having looked at a stringtable res file, I can see the
>format of the file, but
>there is a few bytes at the start of the file, information of sorts, that I
>cannot work out.They


You are being horribly ambitious
- effectively you want to write a resource compiler

Such things already exist
Typically called RC.EXE

They take a text file (typically XXX.RC) and convert it to a .RES file

Also, are you really sure that you want all the strings in the
Resource section of your EXE ?
Personally I would keep them in a Module
.... or perhaps a separate file
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: StringTable.res
Old
  (#3)
Geoff Turner
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:51 AM


"J French" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED...
> On Mon, 24 Nov 2003 11:38:25 -0000, "Geoff Turner"
> <EMAIL REMOVED> wrote:
>
> >Hi all,
> > I'm trying to create a string table for a project. In fact it's to

tidy
> >up an old project.
> >So I have all the strings, and just need to create a table. But I don't

want
> >to have to retype
> >the strings all over again since there are ~150.
> >So I want to deveope a quick progra, so I can cut/paste the strings into

a
> >text file, and have
> >a program ( which I can write ) to read the text file and create a res

file.
> >Now the problem: Having looked at a stringtable res file, I can see the
> >format of the file, but
> >there is a few bytes at the start of the file, information of sorts, that

I
> >cannot work out.They

>
> You are being horribly ambitious
> - effectively you want to write a resource compiler
>
> Such things already exist
> Typically called RC.EXE
>
> They take a text file (typically XXX.RC) and convert it to a .RES file
>
> Also, are you really sure that you want all the strings in the
> Resource section of your EXE ?
> Personally I would keep them in a Module
> ... or perhaps a separate file


Long winter nights...
I could use VB6 Resource Editor, but I have'nt found a way to insert a new
row in the middle of the table. It always appends it.
So I thought of a text file along the lines of
AAA,Message A
BBB, Message B
..
..
..
then run it through my RC prog and out pops two files:
Strings.res
Enums.bas
where Enums.bas contains

Type Enum tagFred
AAA = 101
BBB
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: StringTable.res
Old
  (#4)
J French
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:51 AM

On Mon, 24 Nov 2003 16:15:40 -0000, "Geoff Turner"
<EMAIL REMOVED> wrote:

<snip>

Attack the thing as a text file - or ... I your case I would not

>Long winter nights...
>I could use VB6 Resource Editor, but I have'nt found a way to insert a new
>row in the middle of the table. It always appends it.
>So I thought of a text file along the lines of
>AAA,Message A
>BBB, Message B
>.
>.
>.
>then run it through my RC prog and out pops two files:
>Strings.res
>Enums.bas
>where Enums.bas contains
>
>Type Enum tagFred
> AAA = 101
> BBB
> .
> .
> .
>End Enum
>
>


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: StringTable.res
Old
  (#5)
Steve Gerrard
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:51 AM


"Geoff Turner" <EMAIL REMOVED> wrote in message
news:bptarh$EMAIL REMOVED...
>
> "J French" <EMAIL REMOVED> wrote in message
> news:EMAIL REMOVED...
> > On Mon, 24 Nov 2003 11:38:25 -0000, "Geoff Turner"
> > <EMAIL REMOVED> wrote:
> >
> >(snip)
>>
> > Also, are you really sure that you want all the strings in the
> > Resource section of your EXE ?
> > Personally I would keep them in a Module
> > ... or perhaps a separate file

>
> Long winter nights...
> I could use VB6 Resource Editor, but I have'nt found a way to insert a

new
> row in the middle of the table. It always appends it.
> So I thought of a text file along the lines of
> AAA,Message A
> BBB, Message B
> .
> .
> .
> then run it through my RC prog and out pops two files:
> Strings.res
> Enums.bas
> where Enums.bas contains
>
> Type Enum tagFred
> AAA = 101
> BBB
> .
> .
> .
> End Enum
>
>


I might be inclined to go with J. French's suggestion, and put the
strings in a module or separate text file. However, since you are
interested in the Resource Editor approach, a few comments:
1) You can paste individual strings into the editor, which should be as
quick as pasting them into a text file. Click in the cell first, so you
have the carat blinking, then paste.
2) The new rows are at the end because their default ID is the next
highest ID. The rows are always listed in ascending order of ID, so you
can edit the order by editing the IDs. (Not sure why you care, though).
3) There is also a renumber button available if you first select the ID
column.
4) You could, I imagine, make a program that read the resulting RES file
and created the Enum you are looking for.


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: StringTable.res
Old
  (#6)
Geoff Turner
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:51 AM


"Steve Gerrard" <EMAIL REMOVED> wrote in message
news:lpadnSvYxeaoTV-EMAIL REMOVED...
>
> "Geoff Turner" <EMAIL REMOVED> wrote in message
> (snip)


> I might be inclined to go with J. French's suggestion, and put the
> strings in a module or separate text file. However, since you are
> interested in the Resource Editor approach, a few comments:
> 1) You can paste individual strings into the editor, which should be as
> quick as pasting them into a text file. Click in the cell first, so you
> have the carat blinking, then paste.
> 2) The new rows are at the end because their default ID is the next
> highest ID. The rows are always listed in ascending order of ID, so you
> can edit the order by editing the IDs. (Not sure why you care, though).
> 3) There is also a renumber button available if you first select the ID
> column.
> 4) You could, I imagine, make a program that read the resulting RES file
> and created the Enum you are looking for.
>
>



I think for the moment I'll put the .res file on the back burner, and opt
for the
module/text file approach. A seperate text file looks to be the best option
at
this time, since this will allow the client to change the wording of the
strings,
and once finalised, I can compile them into the exe.

Thanks for comments and suggestions.

GST


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: StringTable.res
Old
  (#7)
J French
Guest
 
Posts: n/a
Default Re: StringTable.res - 06-04-2007, 08:52 AM

On Tue, 25 Nov 2003 09:09:33 -0000, "Geoff Turner"
<EMAIL REMOVED> wrote:

<snip>
>
>I think for the moment I'll put the .res file on the back burner, and opt
>for the
>module/text file approach. A seperate text file looks to be the best option
>at
>this time, since this will allow the client to change the wording of the
>strings,
>and once finalised, I can compile them into the exe.
>
>Thanks for comments and suggestions.


And someone has opted for common sense !

Just be careful how you refer to the strings in the App

If you do it too tersely it will be a bitch to maintain.


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top