Initialize the meta-dictionary.
MCO_RET mco_metadict_init( /*IN*/ mco_metadict_header_t * metadict, /*IN*/ unsigned int size, /*IN*/ unsigned int flags );
metadict | The address of a mco_metadict_header_t structure to initialize |
size |
The size in bytes |
flags |
Flags. The flags parameter defines what happens during the initialization of the dictionary. Currently the only supported value is: 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 | The metadictionary was successfully initialized |
MCO_E_UDA_TOOMANY_ENTRIES | The metadictionary is full |
MCO_E_UDA_NAME_TOO_LONG |
The dictionary name is 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 */ ... }