Solved

How to call GetTapeParameters?

Posted on 1997-08-12
1
505 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio Exe Issue, 12 27
Clean Uninstall of VS Professional 2015 5 51
Please explain "Promise Pattern" and how it's used 2 54
VS2015 Redefinition errors 4 27
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
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…
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.

911 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

18 Experts available now in Live!

Get 1:1 Help Now