MCO_RET mco_uda_db_open( /*IN*/const mco_metadict_header_t * metadict,
/*IN*/ unsigned short dict_no,
/*IN*/ mco_device_t * devs,
/*IN*/ mco_size_t n_devs,
/*IN*/ mco_db_params_t * params);
metadict
dict_no
mco_metadict_count() - 1).devs
n_devs
params
This function can be used to replace
mco_db_open_dev().
MCO_S_OK
MCO_E_UDA_DICT_NOTFOUND
MCO_E_UDA_DICT_NOT_DIRECT
Application snippet: const char * dbname = "SimpleDb"; int main(int argc, char* argv[]) { MCO_RET rc; mco_runtime_info_t info; unsigned int dict_no = 0; unsigned int count; mco_metadict_header_t *header; mco_device_t dev; unsigned int n_dev; mco_db_params_t db_params; mco_uda_class_storage patches[2]; ... mco_runtime_start(); mco_get_runtime_info(&info); ... header = (mco_metadict_header_t *) malloc(size); mco_metadict_init(header, size); /* initialize the metadict */ ... /* open database */ rc = mco_uda_db_open(header, /* meta-dictionary header - must be initialized */ 0, /* dictionary number */ &dev, /* memory devices */ n_dev, /* num of memory devices */ &db_params); /* db parameters */ ... }