网站首页  词典首页

请输入您要查询的函数:

 

术语 disablentmsobject
释义 DisableNtmsObject
语法:
C++
DWORD DisableNtmsObject(
__in HANDLE hSession,
__in DWORD dwType,
__in LPNTMS_GUID lpObjectId
);
DisableNtmsObject功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该DisableNtmsObject功能禁用指定丹参对象。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
dwType [in]
丹参对象类型。此参数可从NtmsObjectsTypes枚举类型为下列值之一。
ValueMeaning
NTMS_DRIVEDrive
NTMS_LIBRARYLibrary
(磁带,光盘,CD或NTMS_PHYSICAL_MEDIAPhysical媒体磁盒)
lpObjectId [in]
唯一标识符丹参对象。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_MODIFY_ACCESS到库包含对象被拒绝。其他安全错误是可能的,但表明安全子系统的错误。
Windows XP/2000操作系统:到库包含对象NTMS_CONTROL_ACCESS被拒绝。其他安全错误是可能的,但表明安全子系统的错误。
ERROR_DATABASE_FAILUREThe数据库无法访问或已损坏。
ERROR_INVALID_HANDLEThe会话句柄丢失或无效。
ERROR_INVALID_PARAMETERAn对象ID丢失或对象类型是无效的。 (对象类型是无效的,如果它不是NTMS_LIBRARY,NTMS_DRIVE,或NTMS_PHYSICAL_MEDIA。)
ERROR_INVALID_STATEThe对象已经禁用。
ERROR_LIBRARY_OFFLINEThe库ID指的是脱机库,不能启用或禁用。
ERROR_OBJECT_NOT_FOUNDThe对象是无效的。
ERROR_SUCCESSThe禁用排队。
备注
排队的DisableNtmsObject函数为指定的对象禁用命令。函数成功返回时,该命令排队。如果RSM正忙,该命令可能需要一些时间才能完成。当介质是残疾人,罗申呈现所有的媒体和有关各方逻辑媒体不可用。所有残疾媒体返回错误的请求。
从服务中删除驱动器或媒体更换驱动器或媒体更换必须首先被禁用。
由残疾对象中包含的所有对象都将被禁用。例如,禁用了物理媒体上禁用所有方面。只要有可能,当驱动器被禁用,在驱动器中被删除,在其插槽内。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
参见
对象管理职能
EnableNtmsObject
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==DisableNtmsObject Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The DisableNtmsObject function disables the specified RSM object.
Syntax
C++
DWORD DisableNtmsObject(
__in HANDLE hSession,
__in DWORD dwType,
__in LPNTMS_GUID lpObjectId
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
dwType [in]
RSM object type. This parameter can be one of the following values from the NtmsObjectsTypes enumeration type.
ValueMeaning
NTMS_DRIVEDrive
NTMS_LIBRARYLibrary
NTMS_PHYSICAL_MEDIAPhysical media (tape, optical disk, CD, or magnetic cartridge)

lpObjectId [in]
Unique identifier of the RSM object.
Return Value
This function returns one of the following values.
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_MODIFY_ACCESS to the library containing the object is denied. Other security errors are possible, but indicate a security subsystem error.
Windows XP/2000: NTMS_CONTROL_ACCESS to the library containing the object is denied. Other security errors are possible, but indicate a security subsystem error.
ERROR_DATABASE_FAILUREThe database is inaccessible or damaged.
ERROR_INVALID_HANDLEThe session handle is missing or is not valid.
ERROR_INVALID_PARAMETERAn object ID is missing or the object type is not valid. (The object type is not valid if it is not NTMS_LIBRARY, NTMS_DRIVE, or NTMS_PHYSICAL_MEDIA.)
ERROR_INVALID_STATEThe object is already disabled.
ERROR_LIBRARY_OFFLINEThe library ID refers to an off-line library that cannot be enabled or disabled.
ERROR_OBJECT_NOT_FOUNDThe object is not valid.
ERROR_SUCCESSThe disable is queued.

Remarks
The DisableNtmsObject function queues a disable command for the specified object. The function returns successfully when the command is queued. If RSM is busy, the command can take some time to complete. When the medium is disabled, RSM renders all of the media's sides and associated logical media unavailable. All requests to disabled media return errors.
To remove a drive or media changer from service the drive or media changer must first be disabled.
All objects contained by a disabled object are also disabled. For example, disabling a piece of physical media disables all sides. Whenever possible, when a drive is disabled, the medium in the drive is removed and placed in its slot.
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
Object Management Functions
EnableNtmsObject
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb525498(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:22:11