网站首页  词典首页

请输入您要查询的函数:

 

术语 preparetape
释义 PrepareTape
语法:
C++
DWORD PrepareTape(
__in HANDLE hDevice,
__in DWORD dwOperation,
__in BOOL bImmediate
);
PrepareTape功能
该PrepareTape函数准备将要访问或删除磁带。
参数
hDevice [in]
设备句柄准备磁带。这种处理是通过使用CreateFile函数创建。
dwOperation [in]
磁带设备的准备。此参数可以是下列值之一。
ValueMeaning
TAPE_FORMAT
5LPerforms一个磁带低级别的格式。目前,只有QIC117设备支持此功能。
TAPE_LOAD
0LLoads的磁带和磁带移动到开始。
TAPE_LOCK
3LLocks磁带弹射机制,使磁带没有被弹射出去意外。
TAPE_TENSION
2LAdjusts由移动磁带的磁带和后端到开始紧张。此选项不支持的所有设备。此值被忽略,如果它不支持。
TAPE_UNLOAD
1LMoves到从设备删除开始磁带。卸载成功后,操作,设备返回错误的应用程序试图访问磁带,直到磁带加载了。
TAPE_UNLOCK
4LUnlocks磁带弹射机制。
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媒体是写保护。
备注
有些磁带设备不支持某些磁带业务。查看您的磁带设备的文档,并使用GetTapeParameters函数来确定您的磁带设备的能力。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateFile
GetTapeParameters
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==PrepareTape Function
The PrepareTape function prepares the tape to be accessed or removed.
Syntax
C++
DWORD PrepareTape(
__in HANDLE hDevice,
__in DWORD dwOperation,
__in BOOL bImmediate
);
Parameters
hDevice [in]
Handle to the device preparing the tape. This handle is created by using the CreateFile function.
dwOperation [in]
Tape device preparation. This parameter can be one of the following values.
ValueMeaning
TAPE_FORMAT
5LPerforms a low-level format of the tape. Currently, only the QIC117 device supports this feature.
TAPE_LOAD
0LLoads the tape and moves the tape to the beginning.
TAPE_LOCK
3LLocks the tape ejection mechanism so that the tape is not ejected accidentally.
TAPE_TENSION
2LAdjusts the tension by moving the tape to the end of the tape and back to the beginning. This option is not supported by all devices. This value is ignored if it is not supported.
TAPE_UNLOAD
1LMoves the tape to the beginning for removal from the device. After a successful unload operation, the device returns errors to applications that attempt to access the tape, until the tape is loaded again.
TAPE_UNLOCK
4LUnlocks the tape ejection mechanism.

bImmediate [in]
If this parameter is TRUE, the function returns immediately. If it is FALSE, the function does not return until the 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
Some tape devices do not support certain tape operations. See your tape device documentation and use the GetTapeParameters function to determine your tape device's capabilities.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateFile
GetTapeParameters
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa362532(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:05