NAME dce_msg_get_default_msg - Retrieves DCE message from in-memory tables SYNOPSIS #include <dce/dce_msg.h> unsigned char *dce_msg_get_default_msg( unsigned32 message, error_status_t *status ); PARAMETERS Input message ID of message to be retrieved. 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 The dce_msg_get_default_msg() routine retrieves a message from the application's in-memory tables. It returns a pointer to static space that should not be freed. If the specified message (which is a 32-bit DCE message ID as described in dce_error_inq_text) cannot be found in the in-memory tables, the routine returns NULL and fills in status with the appropriate error code. This routine should be used only for message strings that will never have to be translated (see dce_msg_translate_table). All messages for a given component are stored in a single message catalog generated by the sams utility when the component is built. 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 set up an in-memory table containing the messages. EXAMPLES The following code fragment shows how dce_msg_get_default_msg() might be called to retrieve the in-memory copy of a message defined by a DCE application (whose serviceability component name is app): #include <dce/dce.h> #include <dce/dce_msg.h> #include <dce/dcesvcmsg.h> #include "dceappmsg.h" /* "test_msg" is defined in this file */ unsigned char *my_msg; error_status_t status; <. . .> my_msg = dce_msg_get_default_msg(test_msg, &status); printf("Message is: %s\n", my_msg); ERROR CODES See dce_msg_get. RELATED INFORMATION Functions: dce_msg_define_msg_table dce_msg_get dce_msg_get_msg