网站首页  词典首页

请输入您要查询的函数:

 

术语 settapeposition
释义 SetTapePosition
语法:
C++
DWORD SetTapePosition(
__in HANDLE hDevice,
__in DWORD dwPositionMethod,
__in DWORD dwPartition,
__in DWORD dwOffsetLow,
__in DWORD dwOffsetHigh,
__in BOOL bImmediate
);
SetTapePosition功能
该SetTapePosition函数设置指定的设备上的磁带位置。
参数
hDevice [in]
设备句柄上设置磁带的地位。这种处理是通过使用CreateFile函数创建。
dwPositionMethod [in]
定位的类型。此参数必须是下列值之一。
ValueMeaning
TAPE_ABSOLUTE_BLOCK
1LMoves到磁带设备的特定块地址指明dwOffsetLow和dwOffsetHigh参数。该dwPartition参数被忽略。
TAPE_LOGICAL_BLOCK
2LMoves到块处理dwOffsetLow和dwOffsetHigh规定由指定的分区dwPartition磁带。
TAPE_REWIND
0LMoves到当前分区的起始磁带。该dwPartition,dwOffsetLow和dwOffsetHigh参数将被忽略。
TAPE_SPACE_END_OF_DATA
4LMoves到了就dwPartition指定的分区中的数据磁带结束。
TAPE_SPACE_FILEMARKS
6LMoves磁带向前(或向后)由dwOffsetLow和dwOffsetHigh指明当前分区filemarks数目。该dwPartition参数被忽略。
TAPE_SPACE_RELATIVE_BLOCKS
5LMoves磁带向前(或向后)由dwOffsetLow和dwOffsetHigh指明当前分区块的数量。该dwPartition参数被忽略。
TAPE_SPACE_SEQUENTIAL_FMKS
7LMoves在当前分区,其中n是由dwOffsetLow和dwOffsetHigh所指明的数目磁带向前(或向后)到n的filemarks第一次出现。该dwPartition参数被忽略。
TAPE_SPACE_SEQUENTIAL_SMKS
9LMoves在当前分区,其中n是由dwOffsetLow和dwOffsetHigh所指明的数目磁带向前(或向后)到n的setmarks第一次出现。该dwPartition参数被忽略。
TAPE_SPACE_SETMARKS
8LMoves磁带向前(或向后)由dwOffsetLow和dwOffsetHigh指明当前分区setmarks数目。该dwPartition参数被忽略。
dwPartition [in]
在分区的位置。如果dwPartition为零,目前的分区使用。逻辑分区的编号到n,1,其中1是在磁带上和n第一个分区是最后一个。
dwOffsetLow [in]
低块地址或由dwPositionMethod参数指定的位置操作数序位。
dwOffsetHigh [in]
高块地址或由dwPositionMethod参数指定的位置操作数序位。如果高序位不是必需的,此参数应为零。
bImmediate [in]
指示是否返回尽快开始的移动操作。如果此参数为TRUE,函数立即返回,如果为false,函数不返回,直到移动作业已经完成。
返回值
如果函数成功,返回值为NO_ERROR。
如果函数失败,它可以返回以下错误代码之一。
ErrorDescription
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媒体是写保护。
备注
如果抵消dwOffsetLow和dwOffsetHigh规定指定块,filemarks号码或setmarks移动,抵消了积极的移动着最后一个块,文件标记,或setmark低端磁带。负偏移向后移动到最后一个块,文件标记,或setmark开始磁带。如果偏移为零,磁带不会移动。
若要获取有关的地位,功能的信息,和磁带驱动器和媒体的能力,调用GetTapeParameters功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateFile
GetTapeParameters
GetTapePosition
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetTapePosition Function
The SetTapePosition function sets the tape position on the specified device.
Syntax
C++
DWORD SetTapePosition(
__in HANDLE hDevice,
__in DWORD dwPositionMethod,
__in DWORD dwPartition,
__in DWORD dwOffsetLow,
__in DWORD dwOffsetHigh,
__in BOOL bImmediate
);
Parameters
hDevice [in]
Handle to the device on which to set the tape position. This handle is created by using the CreateFile function.
dwPositionMethod [in]
Type of positioning to perform. This parameter must be one of the following values.
ValueMeaning
TAPE_ABSOLUTE_BLOCK
1LMoves the tape to the device-specific block address specified by the dwOffsetLow and dwOffsetHigh parameters. The dwPartition parameter is ignored.
TAPE_LOGICAL_BLOCK
2LMoves the tape to the block address specified by dwOffsetLow and dwOffsetHigh in the partition specified by dwPartition.
TAPE_REWIND
0LMoves the tape to the beginning of the current partition. The dwPartition, dwOffsetLow, and dwOffsetHigh parameters are ignored.
TAPE_SPACE_END_OF_DATA
4LMoves the tape to the end of the data on the partition specified by dwPartition.
TAPE_SPACE_FILEMARKS
6LMoves the tape forward (or backward) the number of filemarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition parameter is ignored.
TAPE_SPACE_RELATIVE_BLOCKS
5LMoves the tape forward (or backward) the number of blocks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition parameter is ignored.
TAPE_SPACE_SEQUENTIAL_FMKS
7LMoves the tape forward (or backward) to the first occurrence of n filemarks in the current partition, where n is the number specified by dwOffsetLow and dwOffsetHigh. The dwPartition parameter is ignored.
TAPE_SPACE_SEQUENTIAL_SMKS
9LMoves the tape forward (or backward) to the first occurrence of n setmarks in the current partition, where n is the number specified by dwOffsetLow and dwOffsetHigh. The dwPartition parameter is ignored.
TAPE_SPACE_SETMARKS
8LMoves the tape forward (or backward) the number of setmarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition parameter is ignored.

dwPartition [in]
Partition to position within. If dwPartition is zero, the current partition is used. Partitions are numbered logically from 1 through n, where 1 is the first partition on the tape and n is the last.
dwOffsetLow [in]
Low-order bits of the block address or count for the position operation specified by the dwPositionMethod parameter.
dwOffsetHigh [in]
High-order bits of the block address or count for the position operation specified by the dwPositionMethod parameter. If the high-order bits are not required, this parameter should be zero.
bImmediate [in]
Indicates whether to return as soon as the move operation begins. If this parameter is TRUE, the function returns immediately; if FALSE, the function does not return until the move operation has been completed.
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.
ErrorDescription
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
If the offset specified by dwOffsetLow and dwOffsetHigh specifies the number of blocks, filemarks, or setmarks to move, a positive offset moves the tape forward to the end of the last block, filemark, or setmark. A negative offset moves the tape backward to the beginning of the last block, filemark, or setmark. If the offset is zero, the tape does not move.
To obtain information about the status, capabilities, and capacities of tape drives and media, call the GetTapeParameters function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateFile
GetTapeParameters
GetTapePosition
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa362536(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:25:34