TMAttribute Overview Group

The TMAttribute API call changes the attributes of the file or directory 'fentry' to the attributes 'attribute'. Only the 'name' and 'extension' portions of 'fentry' need be set before calling TMAttribute. See FileEntry for a description of the type. 'attribute' contains bits that are set to apply an attribute and cleared to remove an attribute. 'bit 0' represents the least significant bit in 'attribute'. Here are the attributes for TMEX 3.00:

bit 0 :  set to make file read-only, for files only

bit 1 :  set to make directory hidden, for directories only

bit 2-7 :  reserved for future attributes

short far pascal TMAttribute(

long session_handle,     // session handle for the desired 1-Wire network
void far *state_buffer,  // state buffer provided for the 1-Wire network session
short attribute,         // attribute to be applied to the file
FileEntry far *fentry    // pointer to a structure with the file information

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 an integer with the bit positions representing the attibutes to apply to the file as described above.


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.

Return Value

1 => file attribute changed to 'attribute'

<0 => TMEX File Operations Error Return Code

Code Example

See Also