get_tape_position


unsigned get_tape_position(handle tape,
                           unsigned type,
                           unsigned* partition,
                           unsigned* offset_low,
                           unsigned* offset_high)

This function obtains the current address of the tape in units of logical or absolute blocks.

Parameters

handle tape

The handle of the tape device. This handle is obtained via the function create_file.

unsigned type

The type of address to obtain. One of the following values may be specified.

tape_position_type::absolute The values *OffsetLow and *OffsetHigh are updated to contain the absolute block address. The value *unsigned shortition is set to zero.
tape_position_type::Logical The values *OffsetLow and *OffsetHigh are updated to contain the logical block address. The value *unsigned shortition is updated to contain the logical tape partition.

unsigned* partition

A pointer to a variable that receives the number of the current tape partition. unsigned shortitions are numbered logically from 1 through n, where 1 is the first partition on the tape and n is the last partition on the tape. When an absolute block address is obtained or if the device supports only one partition, *unsigned shortition is set zero.

unsigned* offset_low

This parameter points to a variable that is updated to contain the low-order 32 bits of the block address.

unsigned* offset_high

The parameter points to a variable that is updated to contain the high-order 32 bits of the block address. If the high-order 32 bits are not required, this parameter may be set to null.

Return

unsigned

When the function succeeds, zero is returned; otherwise, a win+ error code is returned.

Notes

A logical block address is relative to a partition. The first logical block address in a partition is zero.