Allocate a new object.
MCO_RET mco_uda_new( /*IN*/ mco_trans_h t, /*IN*/ unsigned short struct_no, /*IN*/ const void * oid, /*IN*/ const mco_uda_value_t * initializers, /*IN*/ unsigned short initializers_no, /*OUT*/ mco_uda_object_handle_t * obj );
t |
The |
struct_no |
The class number for the object being created (must be between 0 and |
oid |
The object’s OID; ignored if OID is not declared for the class |
initializers |
Not used |
initializers_no |
Not used |
obj |
The object handle |
Allocates a new object. Note that the mco_uda_object_handle_t parameter obj is not a real descriptor and can’t be used in certain object related functions (for instance
mco_uda_delete()
ormco_uda_checkpoint()
).
MCO_S_OK | The object was successfully created |
MCO_E_UDA_STRUCT_NOTFOUND | Invalid struct_no |
MCO_E_UDA_STRUCT_NOT_CLASS | This struct_no is not a class |
Application snippet: int main(int argc, char* argv[]) { MCO_RET rc; mco_db_h db; mco_trans_h t; unsigned int record_no = 0; ... rc = mco_trans_start(db, MCO_READ_WRITE, MCO_TRANS_FOREGROUND, &t); if ( MCO_S_OK == rc ) { mco_uda_new(t, record_no, 0, 0, 0, &obj); ... rc = mco_trans_commit(t); } }