Initialize the meta-dictionary.
MCO_RET mco_metadict_init( /*IN*/ mco_metadict_header_t * metadict,
/*IN*/ unsigned int size,
/*IN*/ unsigned int flags );
metadict
size
flags
MCO_METADICT_DONT_LOAD_EXISTING_DBS — This flag indicates that the automatic registration of the opened databases is not done.This function initializes the meta-dictionary. It must be called before any of the UDA API functions are called. The meta-dictionary contains the header and the entry for each dictionary.
MCO_S_OK
MCO_E_UDA_TOOMANY_ENTRIES
MCO_E_UDA_NAME_TOO_LONG
Application snippet:
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
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 */
...
}