Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
MESSAGETABLE (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
The Resource Compiler MESSAGETABLE Statement
MESSAGETABLE [load-option] [mem-option]
BEGIN
string-id string-definition
.
.
.
END
The MESSAGETABLE statement creates one or more string resources for an
application. A string resource is a null-terminated character string that
has a unique string identifier. A string resource can be loaded from the
executable file when needed by using the DosGetResource or DosGetResource2
function with the RT_MESSAGE resource type.
You can provide any number of MESSAGETABLE statements in a
resource-definition file. The compiler treats all the strings from the
various MESSAGETABLE statements as if they belonged to a single statement.
This means that no two strings in a resource-definition file can have the
same string identifier.
Although the MESSAGETABLE and STRINGTABLE statements are nearly identical,
most applications use the STRINGTABLE statement instead of the MESSAGETABLE
statement to create string resources.
Field Description
────────────────────────────────────────────────────────────────────────────
load-option Specifies when the system loads the resource from the
executable file into memory. This value must be one of
the following:
Value Meaning
─────────────────────────────────────────────────────────
PRELOAD System loads the resource when the
application starts.
LOADONCALL System loads the resource when the
application calls the DosGetResource or
DosGetResource2 function. This is the default
value.
mem-option Specifies how the system manages the resource when it is
in memory. This value must be one or more of the
following:
Value Meaning
─────────────────────────────────────────────────────────
FIXED System keeps the resource at a fixed memory
location.
MOVEABLE System moves the resource as necessary to
compact memory.
DISCARDABLE System discards the resource if it is no
longer needed.
The default setting is MOVEABLE and DISCARDABLE.
string-id Specifies the character-string identifier. This value
must be an integer in the range 0 through 65,535, or a
simple expression that evaluates to a value in that
range. The value can be specified in decimal or
hexadecimal notation. Each string identifier in a
resource-definition file must be unique.
string-definition Specifies a character string. This field must contain
zero or more characters enclosed in double quotation
marks. Character values must be in the range 1 through
255. If a double quotation mark is required in the
string, you must provide the double quotation mark
twice.
Comments
You can continue a string on multiple lines by terminating the line with a
backslash (\) or by terminating the line with a double quotation mark (")
and then starting the next line with a double quotation mark.
Example
This example creates two string resources whose string identifiers are 1 and
2.
MESSAGETABLE
BEGIN
1 "Filename not found"
2 "Cannot open file for reading"
END
See Also
DosGetResource, DosGetResource2, STRINGTABLE
♦