VMS Help DCE, dce_intro, dce_msg_intro, dce_msg_define_msg_table *Conan The Librarian (sorry for the slow response - running on an old VAX) |
NAME dce_msg_define_msg_table - Adds a message table to in-memory table SYNOPSIS #include <dce/dce_msg.h> void dce_msg_define_msg_table( dce_msg_table_t *table, unsigned32 count, error_status_t *status ); PARAMETERS Input table A message table structure (defined in a header file generated by sams during compilation (see the EXAMPLES section). count The number of elements contained in the table. Output status Returns the status code from this operation. The status code is a value that indicates whether the routine completed successfully and if not, why not. DESCRIPTION All messages for a given component are stored in a single message catalog generated by the sams utility when the component (application) is built. However, the messages may also be compiled directly into the component code, thus rendering the successful retrieval of message text independent of whether or not the message catalogs were correctly installed. Generation of in-memory message tables is specified by the incatalog flag in the sams file in which the message text is defined (see SAMS for more information on sams files). If the messages have been generated at compile time with this option specified, the dce_msg_define_msg_table() routine can be called by the application to register an in-memory table containing the messages. The table parameter to the call should identify a message table structure defined in a header file generated by sams during compilation (see the EXAMPLES section). The count parameter specifies the number of elements contained in the table. If an error is detected during the call, the routine will return an appropriate error code in the status parameter. EXAMPLES The following code fragment shows how an application (whose serviceability component name is app) would set up an in-memory message table: #include <dce/dce.h> #include <dce/dce_msg.h> #include <dce/dcesvcmsg.h> #include "dceappmsg.h" /* defines app_msg_table */ error_status_t status; The following call adds the message table to the in-memory table. Note that you must include <dce/dce_msg.h>. You also have to link in dceappmsg.obj and dceappsvc.obj (object files produced by compiling sams-generated .c files), which contain the code for the messages and the table, respectively. dce_msg_define_msg_table( app_msg_table, sizeof(app_msg_table) / sizeof(app_msg_table[0]), &status ); ERROR CODES See dce_msg_get. RELATED INFORMATION Functions: dce_msg_get dce_msg_get_msg dce_msg_get_default_msg
|