PreviousNext

dce_msg_get(3dce)

Retrieves text of specified DCE message

Synopsis

#include <dce/dce_msg.h>

unsigned char *dce_msg_get(

unsigned32 message);

Parameters

Input

message
ID of message to be retrieved.

Description
The dce_msg_get( ) routine is a convenience form of the dce_msg_get_msg( ) routine. Like dce_msg_get_msg( ), dce_msg_get( ) retrieves the text for a specified message (which is a 32-bit DCE message ID as described in dce_msg_intro(3dce)). However, dce_msg_get( ) does not return a status code; it either returns the specified message successfully or fails (aborts the program) with an assertion error if the message could not be found or memory could not be allocated.

The routine implicitly determines the correct message catalog in which to access the specified message, and opens it; the caller only has to call this routine.

The routine first searches the appropriate message catalog for the message, and then (if it cannot find the catalog) searches the in-memory message table, if it exists.

The message, if found, is returned in allocated space to which the routine returns a pointer. The pointed-to space must be freed by the caller using free(3).

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

msg_s_bad_id
A message ID with an invalid technology or component was specified.

msg_s_no_cat_open
Could not open the message catalog for the specified message ID.

msg_s_no_cat_perm
Local file permissions prevented the program from opening the message catalog for the specified message ID.

msg_s_no_catalog
The message catalog for the specified message ID does not exist.

msg_s_no_default
Could not find the default message for the specified status code in the internal tables.

msg_s_no_memory
Could not allocate memory for message table, string copy, or other internal requirement.

msg_s_not_found
Could not find the text for the specified status code in either the in-core message tables or the message catalogs.

msg_s_ok_text
The operation was performed successfully.

Related Information
Functions: dce_msg_define_msg_table(3dce)

dce_msg_get_msg(3dce)

dce_msg_get_default_msg(3dce)