TMClose Overview Group

The TMClose API call closes access to a particular 1-Wire network. After this function is called on a 1-Wire network, the only way to use it again is to call TMSetup. A common use of this API call is in hardware situations where a port needs to be powered down when not in use. Note that in the Windows situation where multiple programs may be using a 1-Wire network, closing a port may be disastrous so this function is callable but it does not have an effect in Windows.

short far pascal TMClose(

long session_handle,     // session handle for the desired 1-Wire network

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.

Return Value

1 => 1-Wire network is closed.

<0 => TMEX Hardware Specific Error Return Code

Code Example

See Also