DWORD GetTapePosition(hDevice, lpdwPartition, lpdwOffsetHigh, lpo) | |||||
HANDLE hDevice; | /* open device handle | */ | |||
LPDWORD lpdwPartition; | /* specifies current tape partition | */ | |||
LPDWORD lpdwOffsetHigh; | /* high 32-bits of tape position | */ | |||
LPOVERLAPPED lpo; | /* overlapped structure | */ |
hDevice
Specifies an open handle to the device to get the tape position for.
lpdwPartition
Points to a variable that specifies the current tape partition.
lpdwOffsetHigh
Points to a variable that receives the high-order 32-bits of the current tape position, in blocks from the beginning of the tape.
This parameter can be NULL if the high 32-bits are not required.
If an error occurs, the function sets both the return value and the variable at lpdwOffsetHigh to 0xFFFFFFFF.
lpo
Points to an OVERLAPPED structure. The OVERLAPPED structure has the following form:
typedef struct _OVERLAPPED { /* o */
DWORD Internal;
DWORD InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
} OVERLAPPED;
typedef OVERLAPPED *LPOVERLAPPED;
If the function is successful, the return value is the low-order 32-bits of the current tape position, in blocks from the beginning of the tape.
If an error occurs, the return value is 0xFFFFFFFF. Use the GetLastError function to obtain extended error information.
If both dwOffset and lpdwOffsetHigh are used to retrieve a 64-bit offset, then an error is indicated only when both the return value and the variable at lpdwOffsetHigh are set to 0xFFFFFFFF.
SetTapePosition