Solved

How to call GetTapeParameters?

Posted on 1997-08-12
1
498 Views
Last Modified: 2013-12-03
I am trying to use GetTapeParameters to get the media parameters.  When I use the code segment below, I get a MORE_DATA error with 32 returned in tape_parms_size.  The size of tape_parms is 25.  If I change the tape_parms type to TAPE_GET_DRIVE_PARAMETERS which is 32
bytes then the call will work.  However,  if I don't use the
TAPE_GET_MEDIA_PARAMETERS type then I don't know which bytes represent the block size.  Why is the GET_TAPE_MEDIA_INFORMATION call returning
a structure that is larger than TAPE_GET_MEDIA_PARAMETERS and how do I
know the layout for the structure that it is returning?  I am using Windows NT 4.0 with an Exabyte EXB-8505 8mm tape drive connected to an Adaptec  AHA-2940AU SCSI controller.

TAPE_GET_MEDIA_PARAMETERS tape_parms;
DWORD tape_parms_size;

status = GetTapeParameters(hTape, GET_TAPE_MEDIA_INFORMATION,
&tape_parms_size, &tape_parms);
0
Comment
Question by:pdoughty
1 Comment
 
LVL 3

Accepted Solution

by:
msmits earned 50 total points
Comment Utility
(this is all from memory, as my code is at home and I can't get to it until friday night)

I noticed the same when using the Tape API. There are more locations in the win32 API where the returned size is bigger than the size advertised in the struct definition in the header files. I have learned to ignore the aditional information returned, as they are usually all zero's.
This is also what I do with these extra bytes in my program using the GetTapeParameters function.

BTW. you example code doesn't set the tape_parms_size variable. From your explanation I assume you do so...

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now