The TMChangeDirectory API call sets or reads the current working directory. There is an 'operation' flag that indicates if the call is to set or read the current directory. Here are the values of 'operation':
0 : current directory is set
1 : current directory is read
The value in 'cd_buf' is a DirectoryPath structure that either contains the directory to be set or the current directory read depending on the 'operation' flag. 'cd_buf' must be a DirectoryPath structure.
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 whether reading or setting the current directory. (1) indicates reading and (0) indicates setting.
Specifies a pointer to a memory location that contains a DirectoryPath structure. This structure filled before calling this API if the operation is setting(0). If the operation is reading(1) then this buffer will contain the current directory from the root after the API call.
1 => operation is successful
<0 => TMEX File Operations Error Return Code