The TMTerminateAddFile API call writes the length and CRC bytes into an 'add' type file to terminate it. Doing this prevents further change to the file and it makes the file compatible with the other 1-Wire file structure files. The filename to Terminate is specified in 'fentry' which is in the structure FileEntry. Only the 'name' and 'extension' portions of FileEntry need to be set before calling TMTerminateAddFile. The file must be in the current directory on the current device on the 1-Wire network specified by the session handle 'session_handle'.
For a description of the above types, see the TMEX Type Descriptions.
Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.
Specifies a pointer to a memory location that TMEX keeps all of the state information for the 1-Wire networks. This parameter is required by most TMEX API functions.
Specifies a pointer to a memory location that contains a FileEntry structure. This structure must have the name and extension portions set before calling this API.
1 => 'add' file terminated successfully
<0 => 1-Wire File Operations Error Return Code