PreviousNext

dce_msg_translate_table(3dce)

Translates all in-memory messages in a table

Synopsis

#include <dce/dce_msg.h>

void dce_msg_translate_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 Examples), the contents of which are to be translated.

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
The dce_msg_translate_table( ) routine overwrites the specified in-memory message table (that is, updates the in-memory table with the contents of a message table, which has changed for some reason; for example, because of a change in locale).

If any in-memory message is not found in the message catalog, all in-memory messages are left unchanged.

Examples
The following code fragment shows how dce_msg_translate_table( ) might be called (in an application whose serviceability component name is app) to translate a DCE application's in-memory message table, set up by an earlier call to dce_msg_define_msg_table( ):

#include <dce/dce.h>
#include <dce/dce_msg.h>
#include <dce/dcesvcmsg.h>
#include "dceappmsg.h"

char *loc_return;
error_status_t status;

<. . .>

dce_msg_translate_table(app_msg_table,
sizeof(app_msg_table) / sizeof(app_msg_table[0]),

&status);

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.

See dce_msg_get(3dce)

Related Information
Functions: dce_msg_define_msg_table(3dce)