OSF DCE Application Development Guide--Core Components

DCE Application Messaging
The following code fragment shows how dce_sprintf() might be called
to write the message (with some argument values) into a string:
unsigned char *my_msg;
my_msg = dce_sprintf(arg_msg, 2, 8);
/* Process my_msg as appropriate... */
free(my_msg);
Of course, dce_printf() could also be called to print the message and
arguments:
dce_printf(arg_msg, 2, 8);
dce_pgm_printf()
Equivalent to dce_printf( ), except that it prefixes the program name to
the message (in the standard style of DCE error messages), whereas
dce_printf( ) does not. This allows clients (which do not usually use the
serviceability interface) to produce error (or other) messages that
automatically include the originating application’s name. The message
is printed with a concluding newline.
Note that the client should call dce_svc_set_progname() first to set the
desired application name. Otherwise, the default program name will be
PID# nnnn
where nnnn is the process ID of the application making the call.
dce_pgm_sprintf( )
Equivalent to dce_sprintf(), except that it prefixes the program name to
the string (in the standard style of DCE error messages), whereas
dce_sprintf() does not. Note that the client must call
dce_svc_set_progname() first to set the desired application name.
Otherwise, the default name is
PID# nnnn
where nnnn is the process ID of the application making the call.
dce_pgm_fprintf( )
Equivalent to dce_fprintf( ), except that it prefixes the program name to
the string (in the standard style of DCE error messages), whereas
dce_fprintf() does not. The message is printed with a concluding
newline.
Note that the client must call dce_svc_set_progname( ) first to set the
desired application name. Otherwise, the default name is
PID# nnnn
124245 Tandem Computers Incorporated 3 11