Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to call GetTapeParameters?

Posted on 1997-08-12
1
Medium Priority
?
534 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
msmits earned 100 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

604 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