网站首页  词典首页

请输入您要查询的函数:

 

术语 gettapeposition
释义 GetTapePosition
语法:
C++
DWORD GetTapePosition(
__in HANDLE hDevice,
__in DWORD dwPositionType,
__out LPDWORD lpdwPartition,
__out LPDWORD lpdwOffsetLow,
__out LPDWORD lpdwOffsetHigh
);
GetTapePosition功能
该GetTapePosition函数检索磁带目前的地址,在逻辑或绝对块。
参数
hDevice [in]
设备句柄上获得磁带的地位。这是处理使用CreateFile创建。
dwPositionType [in]
地址类型获得。此参数可以是下列值之一。
ValueMeaning
TAPE_ABSOLUTE_POSITION
0LThe lpdwOffsetLow和lpdwOffsetHigh参数接收设备特定的块地址。在dwPartition参数接收为零。
TAPE_LOGICAL_POSITION
1LThe lpdwOffsetLow和lpdwOffsetHigh参数收到逻辑块地址。在dwPartition参数接收逻辑磁带分区。
lpdwPartition [out]
指针变量接收当前的磁带分区号。逻辑分区的编号到n,1,其中1是在磁带上和n第一个分区是最后一个。当一个特定于设备的块地址检索,或者如果设备支持只有一个分区,此参数接收为零。
lpdwOffsetLow [out]
指针变量,它接收低当前磁带位置序位。
lpdwOffsetHigh [out]
指针变量,它接收高当前磁带位置序位。此参数可以是NULL如果高序位不是必需的。
返回值
如果函数成功,返回值为NO_ERROR。
如果函数失败,它可以返回以下错误代码之一。
错误codeDescription
ERROR_BEGINNING_OF_MEDIA
1102LAn试图访问数据之前开始的介质标记失败。
ERROR_BUS_RESET
1111LA复位条件检测总线上。
ERROR_DEVICE_NOT_PARTITIONED
1107LThe分区信息时,找不到磁带被加载。
ERROR_END_OF_MEDIA
1100LThe最终磁带标记达成了一项行动。
ERROR_FILEMARK_DETECTED
1101LA文件标记达成了一项行动。
ERROR_INVALID_BLOCK_LENGTH
1106LThe块大小不正确的,是在一个多卷分区的新磁带。
ERROR_MEDIA_CHANGED
1110LThe磁带,在驱动器已被替换或删除。
ERROR_NO_DATA_DETECTED
1104LThe终了数据标记达成了一项行动。
ERROR_NO_MEDIA_IN_DRIVE
1112LThere在驱动器中没有媒体。
ERROR_NOT_SUPPORTED
50LThe磁带驱动程序不支持请求的功能。
ERROR_PARTITION_FAILURE
1105LThe磁带不能分区。
ERROR_SETMARK_DETECTED
1103LA setmark达成了一项行动。
ERROR_UNABLE_TO_LOCK_MEDIA
1108LAn试图锁定弹射机制的失败。
ERROR_UNABLE_TO_UNLOAD_MEDIA
1109LAn尝试卸载磁带失败。
ERROR_WRITE_PROTECT
19LThe媒体是写保护。
备注
逻辑块地址是相对于一个分区。第一个在每个分区中的逻辑块地址是零。
调用GetTapeParameters函数以获取有关的地位,功能的信息,和磁带驱动器和媒体的能力。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateFile
GetTapeParameters
SetTapePosition
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==GetTapePosition Function
The GetTapePosition function retrieves the current address of the tape, in logical or absolute blocks.
Syntax
C++
DWORD GetTapePosition(
__in HANDLE hDevice,
__in DWORD dwPositionType,
__out LPDWORD lpdwPartition,
__out LPDWORD lpdwOffsetLow,
__out LPDWORD lpdwOffsetHigh
);
Parameters
hDevice [in]
Handle to the device on which to get the tape position. This handle is created by using CreateFile .
dwPositionType [in]
Type of address to obtain. This parameter can be one of the following values.
ValueMeaning
TAPE_ABSOLUTE_POSITION
0LThe lpdwOffsetLow and lpdwOffsetHigh parameters receive the device-specific block address. The dwPartition parameter receives zero.
TAPE_LOGICAL_POSITION
1LThe lpdwOffsetLow and lpdwOffsetHigh parameters receive the logical block address. The dwPartition parameter receives the logical tape partition.

lpdwPartition [out]
Pointer to a variable that receives the number of the current tape partition. Partitions are numbered logically from 1 through n, where 1 is the first partition on the tape and n is the last. When a device-specific block address is retrieved, or if the device supports only one partition, this parameter receives zero.
lpdwOffsetLow [out]
Pointer to a variable that receives the low-order bits of the current tape position.
lpdwOffsetHigh [out]
Pointer to a variable that receives the high-order bits of the current tape position. This parameter can be NULL if the high-order bits are not required.
Return Value
If the function succeeds, the return value is NO_ERROR.
If the function fails, it can return one of the following error codes.
Error codeDescription
ERROR_BEGINNING_OF_MEDIA
1102LAn attempt to access data before the beginning-of-medium marker failed.
ERROR_BUS_RESET
1111LA reset condition was detected on the bus.
ERROR_DEVICE_NOT_PARTITIONED
1107LThe partition information could not be found when a tape was being loaded.
ERROR_END_OF_MEDIA
1100LThe end-of-tape marker was reached during an operation.
ERROR_FILEMARK_DETECTED
1101LA filemark was reached during an operation.
ERROR_INVALID_BLOCK_LENGTH
1106LThe block size is incorrect on a new tape in a multivolume partition.
ERROR_MEDIA_CHANGED
1110LThe tape that was in the drive has been replaced or removed.
ERROR_NO_DATA_DETECTED
1104LThe end-of-data marker was reached during an operation.
ERROR_NO_MEDIA_IN_DRIVE
1112LThere is no media in the drive.
ERROR_NOT_SUPPORTED
50LThe tape driver does not support a requested function.
ERROR_PARTITION_FAILURE
1105LThe tape could not be partitioned.
ERROR_SETMARK_DETECTED
1103LA setmark was reached during an operation.
ERROR_UNABLE_TO_LOCK_MEDIA
1108LAn attempt to lock the ejection mechanism failed.
ERROR_UNABLE_TO_UNLOAD_MEDIA
1109LAn attempt to unload the tape failed.
ERROR_WRITE_PROTECT
19LThe media is write protected.

Remarks
A logical block address is relative to a partition. The first logical block address on each partition is zero.
Call the GetTapeParameters function to obtain information about the status, capabilities, and capacities of tape drives and media.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateFile
GetTapeParameters
SetTapePosition
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa362528(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:26:21