UnRegisterCtree
Unregister a c-tree instance.
Short Name
UNRCTREE()
Type
Low-Level function
Declaration
COUNT UnRegisterCtree(pTEXT regid)
Description
UnRegisterCtree() frees the allocated memory for the c-tree global structure belonging to the registration reference name pointed to by regid.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
Instance successfully unregistered. |
516 |
GNUL_ERR |
ctNOGLOBALS not defined. |
517 |
GNOT_ERR |
regid is not registered. |
See c-tree Error Codes for a complete listing of valid c-tree error values.
Example
TEXT inpbuf[32]; /* input buffer */
ctrt_printf("\nEnter Instance Name\n");
gets(inpbuf);
if (RegisterCtree(inpbuf))
{
ctrt_printf("\nCould not unregister {%s} data base", inpbuf);
ctlxmg_exit(2);
}
UnRegisterCtree(inpbuf);
Limitations
File handles are not shared between instances. Virtual logic cannot close files in other instances.
See also
NextCtree(), SwitchCtree(), RegisterCtree(), WhichCtree(), GetCtreePointer()