OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
A.2 Object Bind Interface
/****************************************************************************/
/* [27.VI.94] */
/* */
/* sample_bind.c -- The remote binding interface implementation */
/* code. */
/* */
/* */
/* */
/* The code below is built and linked into the server object; meanwhile */
/* the sample_bind.idl file is processed and the output of that is */
/* a set of client and server stubs for the implementation. The server stub */
/* is generated with the -no_mepv option, which allows us to call our im- */
/* plementation by our own names, and explicitly initialize the entry point */
/* vector structure with it (see the end of this file for how that hap- */
/* pens). The client of course calls the routines by its standard name, */
/* as generated in the client stub from sample_bind.idl. */
/* */
/* In order to make the call remotely accessible, the server has to go */
/* through the steps of registering the sample_bind interface (sep- */
/* arately from all other interfaces, of course) with the name service, */
/* and of registering its endpoints with the sample_bind interface (and */
/* the "sample_bind_epv" vector) with the runtime. Then the client */
/* has to import bindings to the sample_bind interface separately as */
/* well. How all this is done can be seen in sample_client.c and */
/* sample_server.c. */
/* */
/* */
/* */
/* -77 cols- */
/****************************************************************************/
#define DCE_DEBUG
#include <stdio.h>
#include <malloc.h>
#include <time.h>
#include <pthread.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/param.h>
A− 70 Tandem Computers Incorporated 124246