GetCtreePointer Return a pointer to a c-tree Plus state variable structure (CTGVAR). Short Name GETCTREE() Type Low-level function Declaration pVOID GetCtreePointer(pTEXT regid) Description GetCtreePointer() returns a pointer to the c-tree Plus state variable structure, CTGVAR, based on the name used in a call to RegisterCtree(). The function declaration returns a pVOID, which should be cast by the application to a pCTGVAR. This function is useful for obtaining the error variables when ctNOGLOBALS is defined, or when utilizing c-tree Plus as a DLL (Dynamic Loadable Library). The most commonly accessed variables from the CTGVAR structure are: COUNT suerr_cod; /* user error cod, uerr_cod */ COUNT ssysiocod; /* system error cod, errno */ COUNT sisam_err; /* isam error, isam_err */ COUNT sisam_fil; /* isam file number, isam_fil */ The complete global structure, CTGVAR, is located in ctgvar.h. Return If the name used in the call to GetCtreePointer() does not exist, then a NULL is returned, otherwise the pointer to the files CTGVAR structure is returned. No error code is set (or reset) by this call whether successful or not. See “c-tree Plus Error Codes” for a complete listing of valid c-tree Plus error values. Example pCTGVAR ctWNGV;
isam_err = ctWNGV->sisam_err See also RegisterCtree(), SwitchCtree(), WhichCtree(), UnRegisterCtree(), |
|||