GetTapeParameters

Hi,

I'm trying to retrieve the block size from a tape. I'm using the method GetTapeParameters, with the flag TAPE_GET_MEDIA_PARAMETERS. The block size returned is 0, although I know that the block size used to write the tape was 64k. Is there anything more I need to do to retrieve the tape block size from a tape

Here's the code snippet:

TAPE_GET_MEDIA_PARAMETERS m_TapeMediaParameters;

DWORD dwSize = sizeof(TAPE_GET_MEDIA_PARAMETERS);

cout << "GetTapeParameters" << endl;

DWORD m_dwLastError = GetTapeParameters(m_MtFile, GET_TAPE_MEDIA_INFORMATION, &dwSize, &m_TapeMediaParameters);

if (ERROR_SUCCESS != m_dwLastError) {

//error - no error occurs

}

cout << "****************************" << std::endl;

cout << "** Tape Media Parameters **" << std::endl;

cout << "****************************" << std::endl;

cout << "Capacity High: " << m_TapeMediaParameters.Capacity.HighPart << std::endl;

cout << "Capacity Low: " << m_TapeMediaParameters.Capacity.LowPart << std::endl;

cout << "Remaining High: " << m_TapeMediaParameters.Remaining.HighPart << std::endl;

cout << "Remaining Low: " << m_TapeMediaParameters.Remaining.LowPart << std::endl;

cout << "Block Size: " << m_TapeMediaParameters.BlockSize << std::endl;

cout << "# Partitions: " << m_TapeMediaParameters.PartitionCount << std::endl;

The output I get is all values of 0, except the partitionCount is 1.

Before I call this method, I first call CreateFile() and PrepareTape(TAPE_LOAD). Is there something else I should be doing

I don't know if it matters, but I'm using a Sony AIT-4 tape. I can read the tape fine, but I need to be able to get the block size used to write to the tape.

Thanks,

Beth



Answer this question

GetTapeParameters