Register a database dictionary in the meta-dictionary.
MCO_RET mco_metadict_unregister( /*IN*/ mco_metadict_header_t * metadict,
/*IN*/ const char * name );
| metadict | The address of a mco_metadict_header_t structure |
|
name |
The name of the dictionary - must be unique within this meta-dictionary |
The API unregisters a database dictionary from the meta-dictionary. This function marks the specified dictionary entry as empty. (Note that, as it is possible to unregister a dictionary, this must be taken into accouont when calling function
mco_metadict_count(). If dictionary unregister operations were used then it is necessary to check the value returned by functionmco_metadict_entry()which indicates whether a dictionary with specified number actually exists. See APImco_metadict_count()for an example.)
| MCO_S_OK | The metadictionary was successfully unregistered |
| MCO_E_UDA_DICT_NOTFOUND | The dictionary is not registered |
Application snippet:
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
MCO_RET rc;
unsigned int size;
mco_metadict_header_t *header;
mco_metadict_size(10, &size); /* figure out the buffer size to
register 10 database dictionaries */
...
header = (mco_metadict_header_t *) malloc(size);
mco_metadict_init(header, size); /* initialize the metadict */
...
rc = mco_metadict_unregister(header, "test_db");
...
}