网站首页  词典首页

请输入您要查询的函数:

 

术语 ejectdiskfromsadrive
释义 EjectDiskFromSADrive
语法:
C++
DWORD EjectDiskFromSADrive(
__in LPCWSTR lpComputerName,
__in LPCWSTR lpAppName,
__in LPCWSTR lpDeviceName,
__in HWND hWnd,
__in LPCWSTR lpTitle,
__in LPCWSTR lpMessage,
__in DWORD dwOptions
);
EjectDiskFromSADrive功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该EjectDiskFromSADrive函数弹出媒体,在一个独立的可移动驱动器。
参数
lpComputerName [in]
可移动存储管理器(RSM)服务器的名称。如果该参数为NULL,当前计算机的名称使用。
lpAppName [in]
唯一的字符串标识应用程序。该名称标识的资源和经营者的要求。此参数是可选的,可以为null。
lpDeviceName [in]
该设备的名称弹出。例如,\\ \\。\\ Cdrom0或\\ \\。\\的PhysicalDriveX(其中X是驱动器的数量正在访问)。
hWnd [in]
句柄用户确认对话框窗口。
lpTitle [in]
标题显示在一个对话框,让用户输入。
lpMessage [in]
消息显示在一个对话框,让用户输入。
dwOptions [in]
要执行的动作。此参数可以是下列值之一。
ValueMeaning
NTMS_EJECT_STARTStart与端口弹出操作。指定的媒介被弹出,直到超时事件发生时或函数的调用NTMS_EJECT_STOP了。超时值是在库指定对象,并应用到库的所有喷发。
NTMS_EJECT_STOPTerminate时间之前弹射过程中的赛事失误。
NTMS_EJECT_QUEUEAllow弹出的是异步的。函数队列为弹出指定的媒体,然后返回。
NTMS_EJECT_FORCEForce媒体被弹出。例如,NTFS可以举办传媒锁,而这个选项将导致媒体要跳伞,但仍锁。
NTMS_EJECT_IMMEDIATEEject媒体立即同步。该函数将不会返回,直到弹出完成。不排队弹出指定的媒体。
NTMS_EJECT_ASK_USEREject媒体立即同步。该函数将不会返回,直到弹出完成。不排队弹出指定的媒体。如果弹出操作失败,提示用户可以取消或武力行动。
返回值
这个函数返回下列值之一。
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_PARAMETERA库ID或操作ID指针丢失。
ERROR_LIBRARY_OFFLINEThe库ID指的是一个脱机库,不能弹出媒体。
ERROR_MEDIA_NOT_AVAILABLEThe媒体被禁用。
ERROR_NOT_ENOUGH_MEMORYThere是在处理过程中分配失败。
ERROR_SUCCESSThe弹出操作成功。
备注
虽然EjectNtmsMedia可以在某些情况下,用于完成相同的功能,EjectDiskFromSADrive提供了一个方便的方法来弹出一个独立的装置,从媒体,通过指定的驱动器的名称而不是它的丹参的名字。在某些情况下,它是唯一的方法,克服文件在媒体系统锁定,以退出该媒体。
该EjectDiskFromSADrive函数返回到如弹出要求尽快申请排队,除非NTMS_EJECT_IMMEDIATE选项指定。
媒体跳伞使用EjectDiskFromSADrive功能是移动到脱机库或从数据库中删除。汇入媒体,无法识别的媒体,和不兼容的媒体都将被删除时弹出。
该EjectDiskFromSADrive功能不起作用的脱机库。
要求:
client最低支持Vista
最低支持serverWindows服务器2003
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
Unicode和ANSI namesEjectDiskFromSADriveW(Unicode)和EjectDiskFromSADriveA(ANSI)的
参见
库控制功能
InjectNtmsMedia
EjectNtmsMedia
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==EjectDiskFromSADrive Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The EjectDiskFromSADrive function ejects the media that is in a standalone removable drive.
Syntax
C++
DWORD EjectDiskFromSADrive(
__in LPCWSTR lpComputerName,
__in LPCWSTR lpAppName,
__in LPCWSTR lpDeviceName,
__in HWND hWnd,
__in LPCWSTR lpTitle,
__in LPCWSTR lpMessage,
__in DWORD dwOptions
);
Parameters
lpComputerName [in]
Removable Storage Manager (RSM) server name. If this parameter is NULL, the current computer name is used.
lpAppName [in]
Unique character string that identifies the application. This name identifies resources and operator requests. This parameter is optional and may be NULL.
lpDeviceName [in]
Name of the device to eject. For example, \\\\.\\Cdrom0 or \\\\.\\PhysicalDriveX (where X is the number of the drive being accessed).
hWnd [in]
Handle to a dialog box window for user confirmation.
lpTitle [in]
Title displayed in a dialog box to get user input.
lpMessage [in]
Message displayed in a dialog box to get user input.
dwOptions [in]
Action to perform. This parameter can be one of the following values.
ValueMeaning
NTMS_EJECT_STARTStart the eject operation with a port. The specified medium is ejected until the time-out event occurs or the function is called again with NTMS_EJECT_STOP. The time-out value is specified in the library object and is applied to all ejections in the library.
NTMS_EJECT_STOPTerminate the ejection process before the time-out event lapses.
NTMS_EJECT_QUEUEAllow the eject to be asynchronous. The function queues the specified media for ejection and then returns.
NTMS_EJECT_FORCEForce the media to be ejected. For example, NTFS can hold locks on media, and this option will cause the media to be ejected despite that lock.
NTMS_EJECT_IMMEDIATEEject the media immediately and synchronously. The function will not return until the eject is complete. Does not queue the specified media for ejection.
NTMS_EJECT_ASK_USEREject the media immediately and synchronously. The function will not return until the eject is complete. Does not queue the specified media for ejection. If the eject operation fails, prompt the user to either cancel or force the operation.

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 was performed on an operation ID that was not valid.
ERROR_INVALID_PARAMETERA library ID or operation ID pointer is missing.
ERROR_LIBRARY_OFFLINEThe library ID refers to an offline library that cannot eject media.
ERROR_MEDIA_NOT_AVAILABLEThe media is disabled.
ERROR_NOT_ENOUGH_MEMORYThere was an allocation failure during processing.
ERROR_SUCCESSThe eject operation was successful.

Remarks
Although EjectNtmsMedia can, in some cases, be used to accomplish the same functionality, EjectDiskFromSADrive provides a convenient way to eject media from a standalone device, by specifying its drive name instead of its RSM name. In some cases it is the only way to overcome file system locks on the media in order to eject that media.
The EjectDiskFromSADrive function returns to the application as soon as the eject request is queued, unless NTMS_EJECT_IMMEDIATE option is specified.
Media ejected using the EjectDiskFromSADrive function is moved to the offline library or deleted from the database. Import media, unrecognized media, and incompatible media are deleted when ejected.
The EjectDiskFromSADrive function does not work with the offline library.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2003
End of client supportWindows Vista
End of server supportWindows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
Unicode and ANSI namesEjectDiskFromSADriveW (Unicode) and EjectDiskFromSADriveA (ANSI)
See Also
Library Control Functions
InjectNtmsMedia
EjectNtmsMedia
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb525502(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 11:27:11