Solved

How to call GetTapeParameters?

Posted on 1997-08-12
1
510 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
ID: 1403722
(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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
Query performance - SQL Server 20 81
What is Runtime?  What is Middleware?  Azure stack 1 330
What namespace do I need to import? 2 25
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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