PreviousNext

dced_objects_release(3dce)

Releases the resources allocated for data read from a dced service

Synopsis

#include <dce/dced.h>

void dced_objects_release(

dced_binding_handle_t dced_bh,

unsigned32 count,

void *data,

error_status_t *status);

Parameters

Input

dced_bh
Specifies the dced binding handle for a dced service on a specific host.

count
Specifies the number of data items previously read and now to be released.

Input/Output

data
Specifies the data for which resources are released.

Output

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The dced_objects_release( ) routine releases the resources allocated when data for dced is read. Applications should call dced_objects_release( ) when finished with data allocated by the following dced API routines:

· dced_object_read_all( )

· dced_object_read( )

· dced_hostdata_read( )

If the data being released was read by using dced_object_read_all( ), the count returned from this routine is used as input to the dced_objects_release( ) routine. If the data being released was read by using dced_object_read( ) or dced_hostdata_read( ), the count value required as input for the dced_objects_release( ) routine is 1.

Examples
In the following example, a binding is created to a dced service on some host for a service that stores data, and the service's entry list is obtained. For each entry, the data is read, displayed, and released.

dced_binding_handle_t dced_bh;
dced_entry_list_t entries;
unsigned32 i;
void *data;
error_status_t status;

dced_binding_create(host_service, dced_c_binding_syntax_default, &dced_bh, &status);
dced_list_get(dced_bh, &entries, &status);
for(i=0; i<entries.count; i++) {
dced_object_read(dced_bh, &(entries.list[i].id), &data, &status);
display(host_service, 1, &data); /* application specific */
dced_objects_release(dced_bh, 1, data, &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.

error_status_ok

dced_s_bad_binding

dced_s_no_support

Related Information
Routines: dced_object_read(3dce)

dced_object_read_all(3dce)

dced_hostdata_read(3dce)

dced_binding_create(3dce)

dced_binding_from_rpc_binding(3dce)

Book: OSF DCE Application Development Guide - Core Components