#### Binding to Named Objects by UUID

To bind to a named object by its object ID, the argument provided to the bind( ) operation should be a uuid_t reference. The argument specifies the UUID of the registered object in the CDS hierarchy. The DCE environment variable RPC_DEFAULT_ENTRY must be set to indicate where the search for the object is to begin in the CDS name space. For example, the following code fragment uses an object's UUID to create a local object proxy in the client application bound to the remote object:

const char *UUID = "f063cf5a-c5c8-11ce-8a4b-08002be415b2";
Matrix *m; // interface pointer
uuid_t u; // uuid of named object
unsigned32 status; // error status
// get a uuid from string format
uuid_from_string ((unsigned_char_t *) UUID, &u, &status);
if (status !=uuid_s_ok) {
// handle error case
}
// bind to a named object by uuid
m = Matrix::bind(u);
if (m) {
print (m);
} else {
cerr << Cannot bind to named object << endl;
}

####