OSF DCE Application Development Guide--Core Components

The DCE Backing Store
The following routines store data into a backing store:
dce_db_store( )
This routine can store into a backing store that is indexed by name or by
UUID. The key’s type must match the flag that was used in
dce_db_open( ).
dce_db_store_by_name()
This routine can store only into a backing store that is indexed by name.
dce_db_store_by_uuid()
This routine can store only into a backing store that is indexed by UUID.
To retrieve data from a backing store, use the appropriate one of the following routines:
dce_db_fetch()
This routine can retrieve data from a backing store that is indexed by
name or by UUID. The key’s type must match the flag that was used in
dce_db_open( ).
dce_db_fetch_by_name( )
This routine can retrieve data only from a backing store that is indexed
by name.
dce_db_fetch_by_uuid( )
This routine can retrieve data only from a backing store that is indexed
by UUID.
When storing or retrieving data, a function that was specified at open time converts
between native format and on-disk (serialized) format. This function is generated from
the IDL file by the IDL compiler.
5.6.4 Freeing Data
When fetching data, the encoding services allocate memory for the data structures that
are returned. These services accept a structure and use rpc_sm_allocate( ) to provide
additional memory needed to hold the data.
The backing store library does not know what memory has been allocated and, therefore,
cannot free it. For fetch calls that are made from a server stub, this is not a problem
because the memory is freed automatically when the server call terminates. For fetch
calls that are made from a nonserver, the programmer is responsible for freeing the
memory.
Programs that call the fetch or store routines, such as dce_db_fetch( ), outside of a server
operation (for instance, if a server does some backing store initialization, or in a
standalone program) must call rpc_sm_enable_allocate() first.
124245 Tandem Computers Incorporated 57