If files (e.g. INI files) are changeable, they can be checked out automatically by using TDVMOD.
For this purpose, the followings steps have to be taken:
The following functions are carried out by the rules provided in TDVMOD:
“TdvcsGetWorkRoot” determines the name of the root directory or an empty value, if no work environment is used.
“TdvcsGetTopRoot” determines the name of the root directory (the topmost directory in a work environment).
“TdvcsIsUpdateAllowed” indicates, if changing the desired file is allowed. In case a change is permitted, an empty value is returned. In case a change is not allowed, the environment where the file has been checked out to its returned. This routine is intended to be a check routine before calling the processing routine, in order to check, for example, for basic locks due to checkouts. Thus, warnings can be issued beforehand.
“TdvcsGetCheckedOutToForName” identifies the root path for a file determined by “TDVCSReadName” and to which it is checked out to. Alternatively it provides an empty name, in case the file is not checked out. This routine is primarily used internally to return error messages to indicate, to which environment the file has been checked out to.
“TdvcsCreateFullFileName” determines the complete file name under which the file was found in the current environment, or which would have to be used, if the file needs to be created anew. This routine is used to determine the current path for a file and to take care that the file will also be checked out for editing.
If “TdvcsCreateFullFileName” is called with set checkout flag, the file will then automatically be checked out to the topmost level that is possible. In case this is not possible, the status is indicated with a positive error code, that has to be handled by the calling software.