网站首页  词典首页

请输入您要查询的函数:

 

术语 injectntmsmedia
释义 InjectNtmsMedia
语法:
C++
DWORD InjectNtmsMedia(
__in HANDLE hSession,
__in LPNTMS_GUID lpLibraryId,
__out LPNTMS_GUID lpInjectOperation,
__in DWORD dwAction
);
InjectNtmsMedia功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该InjectNtmsMedia函数允许媒体进行到指定的库端口插入。如果库繁忙,罗申队列InjectNtmsMedia和返回成功。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
lpLibraryId [in]
唯一标识符的库对象。
lpInjectOperation [out]
插入的GUID库操作。如果dwAction是NTMS_INJECT_START,此参数接收的运作的GUID。如果dwAction是NTMS_INJECT_STOP,此参数必须设置为操作GUID来加以制止。
dwAction [in]
此参数可以是下列值之一。
ValueMeaning
NTMS_INJECT_STARTStart同一个端口插入操作。媒体反复插入,直到超时事件发生时或函数的调用NTMS_INJECT_STOP了。
NTMS_INJECT_STOPTerminate插入过程之前超时事件1992-1993。
NTMS_INJECT_RETRACTDirect库收回的插入/弹出端口和放置媒体运营商那里检查。
NTMS_INJECT_START_MANYDirect插入/弹出端口开放和检查,不断把那里的经营媒体。如果一个中等发现,插入/弹出端口重新得到更多的媒体。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_CONTROL_ACCESS到库被拒绝。其他安全错误也是可能的,但它们都将意味着安全子系统的错误。
ERROR_DATABASE_FAILUREThe数据库无法访问或已损坏。
ERROR_DATABASE_FULLThe数据库已满。
ERROR_DEVICE_NOT_AVAILABLEThe库被禁用。
ERROR_INVALID_HANDLEThe会话ID丢失或无效。
ERROR_INVALID_OPERATIONA停止行动,行动上执行的ID是无效的。
ERROR_INVALID_PARAMETERThe库ID或操作ID指针丢失。
ERROR_LIBRARY_OFFLINEThe库ID指的是一个脱机库,不能弹出媒体。
ERROR_NOT_ENOUGH_MEMORYThere是在处理过程中分配失败。
ERROR_SUCCESSThe插入排队。
备注
这个函数返回到只要插入要求尽快申请排队。
如果被InjectNtmsMedia功能所指明的库没有一个端口,使用AccessNtmsLibraryDoor函数来插入和弹出媒体。
此函数不能用于脱机库。
插入开始的插入到媒体库的过程。由于库对NTMS_IEPORT对象的功能各不相同,每个设备可能操作略有不同。以下步骤描述了如何处理的,一般丹参注射:
插入媒体库
允许/解锁/延长NTMS_IEPORT。
整整NTMS_IEPORT波尔,收回NTMS_IEPORT,停止注入命令,或超时值。如果这些都不会发生,继续等待。 (多盒插入/弹出端口扫描不完整状态。)
当上述事件之一发生时,NTMS_IEPORT被锁定,每个NTMS_IEPORT中被移动到一个插槽以及一个识别中型命令为每个媒介排队。
如果没有在NTMS_IEPORT对象的媒体不够插槽,媒体仍然在NTMS_IEPORT对象和操作员请求被发送到有媒体从库中删除。
如果没有自由插槽,InjectNtmsMedia函数收到一个错误。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
参见
库控制功能
EjectNtmsMedia
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==InjectNtmsMedia Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The InjectNtmsMedia function allows media to be inserted into the port of the specified library. If the library is busy, RSM queues InjectNtmsMedia and returns success.
Syntax
C++
DWORD InjectNtmsMedia(
__in HANDLE hSession,
__in LPNTMS_GUID lpLibraryId,
__out LPNTMS_GUID lpInjectOperation,
__in DWORD dwAction
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
lpLibraryId [in]
Unique identifier of a library object.
lpInjectOperation [out]
GUID of the insert library operation. If dwAction is NTMS_INJECT_START, this parameter receives the GUID for the operation. If dwAction is NTMS_INJECT_STOP, this parameter must be set to the GUID for the operation to be stopped.
dwAction [in]
This parameter can be one of the following values.
ValueMeaning
NTMS_INJECT_STARTStart the insert operation with a port. Media is repeatedly inserted until the time-out event occurs or the function is called again with NTMS_INJECT_STOP.
NTMS_INJECT_STOPTerminate the insertion process prior to the time-out event lapsing.
NTMS_INJECT_RETRACTDirect the library to retract the insert/eject port and check for media placed there by the operator.
NTMS_INJECT_START_MANYDirect the insert/eject port to open continually and check for media placed there by the operator. If a medium is found, the insert/eject port is reopened to receive more media.

Return Value
This function returns one of the following values.
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_CONTROL_ACCESS to the library is denied. Other security errors are also possible, but they would indicate a security subsystem error.
ERROR_DATABASE_FAILUREThe database is inaccessible or damaged.
ERROR_DATABASE_FULLThe database is full.
ERROR_DEVICE_NOT_AVAILABLEThe library is disabled.
ERROR_INVALID_HANDLEThe session ID is missing or is not valid.
ERROR_INVALID_OPERATIONA Stop action was performed on an operation ID that was not valid.
ERROR_INVALID_PARAMETERThe library ID or operation ID pointer is missing.
ERROR_LIBRARY_OFFLINEThe library ID refers to an offline library that cannot eject media.
ERROR_NOT_ENOUGH_MEMORYThere was an allocation failure during processing.
ERROR_SUCCESSThe insert is queued.

Remarks
This function returns to the application as soon as the insert request is queued.
If the library specified by the InjectNtmsMedia function does not have a port, use the AccessNtmsLibraryDoor function to insert and eject media.
This function cannot be used with the offline library.
Insert begins the process of inserting media into a library. Because libraries vary on the functionality of the NTMS_IEPORT object, each device may operate slightly differently. The following steps describe how RSM generally handles an inject:
To insert media into a library
Allow/unlock/extend the NTMS_IEPORT.
Poll for a full NTMS_IEPORT, a retracted NTMS_IEPORT, a Stop Inject command, or a time-out value. If none of these have occurred, continue to wait. (Multi-cartridge insert/eject ports are not scanned for full status.)
When one of the preceding events occurs, the NTMS_IEPORT is locked, each medium in the NTMS_IEPORT is moved to a slot, and an identify medium command is queued for each medium.
If there are not enough slots for the media in the NTMS_IEPORT object, the media remains in the NTMS_IEPORT object and an Operator Request is posted to have media removed from the library.
If there are no free slots, the InjectNtmsMedia function receives an error.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
End of client supportWindows Vista
End of server supportWindows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
See Also
Library Control Functions
EjectNtmsMedia
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb540685(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:20:31