The GetTapeStatus function indicates whether the tape device is ready to process tape commands.
Declare Function GetTapeStatus Lib "kernel32" Alias "GetTapeStatus" (ByVal hDevice As Long) As Long
Operating Systems Supported
Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Identifies the device for which to get the device status. This handle is created by using the CreateFile function.
If the tape device is ready to accept appropriate tape-access commands without returning errors, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes:
An attempt to access data before the beginning-of-medium marker failed.
A reset condition was detected on the bus.
The end-of-tape marker was reached during an operation.
A filemark was reached during an operation.
A setmark was reached during an operation.
The end-of-data marker was reached during an operation.
The tape could not be partitioned.
The block size is incorrect on a new tape in a multivolume partition.
The partition information could not be found when a tape was being loaded.
The tape that was in the drive has been replaced or removed.
There is no media in the drive.
The tape driver does not support a requested function.
An attempt to lock the ejection mechanism failed.
An attempt to unload the tape failed.
The media is write protected.