OSF DCE Application Development Guide--Core Components
DCE Application Messaging
The routine will fail if the message catalog is not installed or if LANG is
not properly set.
The following code fragment shows how dce_msg_get_cat_msg( )
might be called to retrieve the ‘‘Hello World’’ message:
#include <dce/dce.h>
#include <dce/dce_msg.h>
#include "dcehelmsg.h"
unsigned32 status;
unsigned_char_t *msg;
<. . .>
msg = dce_msg_get_cat_msg(hello_msg, &status);
printf("Message from dce_msg_get_cat_msg == %s\n", msg);
dce_msg_cat_close( )
(DCE abstraction over catclose( )) Closes the catalog
specified by handle.
The following code fragment shows how dce_msg_cat_close( ) might be
called to close the message catalog containing the ‘‘Hello World’’
message:
#include <dce/dce.h>
#include <dce/dce_msg.h>
#include "dcehelmsg.h"
dce_msg_cat_handle_t hel_msg_handle;
unsigned32 status;
<. . .>
dce_msg_cat_close(hel_msg_handle, &status);
124245 Tandem Computers Incorporated 3− 17