The TMFirstFile API call finds the first file in the current device and directory on the 1-Wire network specified by 'session_handle' and copies the information about the file into the buffer fentry. The information is in the form of a structure.
For a description of the above types, see the TMEX Type Descriptions.
Parameters
session_handle
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.
state_buffer
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.
fentry
Specifies a pointer to a memory location that contains a FileEntry structure. This structure will be used to save the file information from the first file in the current directory of the current device on the 1-Wire network.
Return Value
>0 => first file entry is in buffer 'fentry'
0 => current directory has no files but bitmap returned in fentry
<0 => TMEX File Operations Error Return Code
See Also
TMNextFile, TMOpenFile, TMReadFile