GetTapeStatus

  DWORD GetTapeStatus(hDevice, plInfoBuffer, lpo)    
  HANDLE hDevice; /* open device handle */
  PLONG plInfoBuffer; /* buffer for returned status */
  LPOVERLAPPED lpo; /* overlapped structure */

Parameters

hDevice

Specifies an open handle to the device to get status for.

plInfoBuffer

Receives status for the device as a structure with the following member:

Member Description

DWORD  
  Specifies tape status with the following defined bits:

Value Meaning

TAPE_STATUS_DEVICE_READY The device is not ready.
TAPE_STATUS_NO_MEDIA No media in device.
TAPE_STATUS_WRITE_PROTECTED The media is write protected.
TAPE_STATUS_MEDIA_CHANGED The media has changed since the last call to this function or the last tape operation.
TAPE_STATUS_RESET_DETECTED The device has been reset since the last call to this function or the last tape operation.
TAPE_STATUS_BEGINNING_OF_MEDIA The device is at the beginning of the media.
TAPE_STATUS_END_OF_MEDIA The device is at the end of the media.
TAPE_STATUS_DEVICE_NOT_READY The device is not ready.

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;

Return Value

If the function is successful, the return value is NO_ERROR. Otherwise, it is an error code.