DWORD GetTapeParameters(hDevice, dwOperation, plInfoBuffer, lpo) | |||||
HANDLE hDevice; | /* open device handle | */ | |||
DWORD dwOperation; | /* specifies type of information requested | */ | |||
PLONG plInfoBuffer; | /* buffer for returned information | */ | |||
LPOVERLAPPED lpo; | /* overlapped structure | */ |
hDevice
Specifies an open handle to the device to get information for.
dwOperation
Specifies the type of information requested. If dwOperation is GET_TAPE_MEDIA_INFORMATION, the buffer at plInfoBuffer receives information about the tape media as a structure with the following members:
Member | Description |
DWORD TapeCapacity; | Lower 32 bits of tape capacity in bytes. |
DWORD TapeCapacityHigh; | Upper 32 bits of tape capacity in bytes. |
DWORD TapeRemaining; | Lower 32 bits of tape remaining in bytes. |
DWORD TapeRemainingHigh; | Upper 32 bits of tape remaining in bytes. |
DWORD TapeType; | Determines the tape type of the current tape. |
DWORD TapeDensity; | Determines the tape density. |
DWORD TapeBlockSize; | Determines the number of bytes per block. Typical block sizes are usually some multiple of 512 bytes, and range from 512 bytes to 32 KB. |
DWORD TapePartitions; | Determines the number of partitions on the current tape. |
BOOLEAN TapeWriteProtection; | Determines whether the current tape is write protected. |
If dwOperation is GET_TAPE_DRIVE_INFORMATION, the buffer at plInfoBuffer receives information about the drive as a structure with the following members:
Member | Description |
DWORD | Contains bit flags that describe the tape drive, as shown in the following list: |
Value | Meaning |
TAPE_DRIVE_ECC | Supports hardware error correction? |
TAPE_DRIVE_COMPRESSION | Supports hardware data compression? |
TAPE_DRIVE_SETMARKS | Supports setmarks? |
TAPE_DRIVE_SHORT_FILEMARKS | Supports short filemarks? |
TAPE_DRIVE_LONG_FILEMARKS | Supports long filemarks? |
TAPE_DRIVE_PADDING | Is data being padded? Tape drives pad to keep a device streaming at a constant speed. |
TAPE_DRIVE_SHORT_ERASE | Supports short erase? |
TAPE_DRIVE_LONG_ERASE | Supports long erase? |
DWORD | ||||
Contains flags that specify the current settings for the tape drive, as shown in the following list: | ||||
Value | Meaning |
TAPE_DRIVE_ECC | Return hardware error correction setting, on or off. |
TAPE_DRIVE_COMPRESSION | Return hardware data compression setting, on or off. |
TAPE_DRIVE_PADDING | Return data padding setting, on or off. |
plInfoBuffer
Points to a buffer to receive the information requested by the dwOperation parameter.
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 NO_ERROR. Otherwise, it is an error code.
SetTapeParameters