Posted: Tue Mar 04, 2003 4:33 pm
Restored from previous forum. Originally posted by SimpleMind.
Hi,
For now let me tell you the context of my problem. I have a program X that uses plugin modules. These are normal "dll" files but renamed to i.e. "pmx" and are usually made in MS-C/C++
. If this "pmx" is present in the source directory were X resides, it is recognized and tagable in a plugin list inside the program. I'm trying to translate this C-code to PB. It's just a large Jig Zaw puzzle. Piece by piece gathering the information for the translation.
Now I'm finding some string table constants on my way in the c-code. I have a description from Jacob Navia's manual of LCC to give you some background information.
------------ String tables start ---
This utility allows you to edit the string tables contained in your resource file. String tables are a resource kind for storing character strings in the resource section of the executable instead of using string literal in the program text itself.
The original motivation for this was the ever-growing need under windows 3.0 to have more memory with the space severely limited to 64K for the stack, all character strings, and all static data. This lead to trying to make more space in the data segment by putting the strings somewhere else, and loading /unloading them as needed.
But there are many other beneficial side effects, so the usage of string tables has stayed with us even in windows 98. One of the good side effects is the separation from message text from the code itself, so that if you need to translate the program into another language you do not need to edit the source files, but just the resource file, what is far easier for the person who is doing the translation, since he/she doesn’t have to be a programmer AND a foreign language expert, a rare combination.
------------ string table end ----------
Here are now my questions:
1. Does someone know how to mimic these string table in PB.
2. If this is done by the "Data" statement how can you give the string an ID. Because the program expects from a certain ID number a string with a specific formatting.
SimpleMind,
Perfection is reached not when there is no longer anything to add,
but when there is no longer anything to take away. (A. Saint-Exupery)
- Registered PureBasic Coder. -
Hi,
For now let me tell you the context of my problem. I have a program X that uses plugin modules. These are normal "dll" files but renamed to i.e. "pmx" and are usually made in MS-C/C++
Now I'm finding some string table constants on my way in the c-code. I have a description from Jacob Navia's manual of LCC to give you some background information.
------------ String tables start ---
This utility allows you to edit the string tables contained in your resource file. String tables are a resource kind for storing character strings in the resource section of the executable instead of using string literal in the program text itself.
The original motivation for this was the ever-growing need under windows 3.0 to have more memory with the space severely limited to 64K for the stack, all character strings, and all static data. This lead to trying to make more space in the data segment by putting the strings somewhere else, and loading /unloading them as needed.
But there are many other beneficial side effects, so the usage of string tables has stayed with us even in windows 98. One of the good side effects is the separation from message text from the code itself, so that if you need to translate the program into another language you do not need to edit the source files, but just the resource file, what is far easier for the person who is doing the translation, since he/she doesn’t have to be a programmer AND a foreign language expert, a rare combination.
------------ string table end ----------
Here are now my questions:
1. Does someone know how to mimic these string table in PB.
2. If this is done by the "Data" statement how can you give the string an ID. Because the program expects from a certain ID number a string with a specific formatting.
SimpleMind,
Perfection is reached not when there is no longer anything to add,
but when there is no longer anything to take away. (A. Saint-Exupery)
- Registered PureBasic Coder. -