mco_dict_struct_count
MCO_RET mco_dict_struct_count( /*IN*/ mco_metadict_header_t * metadict,
/*IN*/ unsigned short dict_no,
/*OUT*/ unsigned short * count );
此函数返回 array 中 index 引用的字典的结构/类数。dict_no``metadict->entries[]
| |
---|
MCO_S_OK | 已成功返回计数 |
MCO_E_UDA_DICT_NOTFOUND | 词典未注册 |
/* 应用程序代码片段 */
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
MCO_RET rc;
unsigned int dict_no = 0;
unsigned int count;
mco_metadict_header_t *header;
...
header = (mco_metadict_header_t *) malloc(size);
mco_metadict_init(header, size); /* initialize the metadict */
...
rc = mco_dict_struct_count(header, dict_no, &count);
...
}