网站首页  词典首页

请输入您要查询的函数:

 

术语 createntmsmediapool
释义 CreateNtmsMediaPool
语法:
C++
DWORD CreateNtmsMediaPool(
__in HANDLE hSession,
__in LPCTSTR lpPoolName,
__in LPNTMS_GUID lpMediaType,
__in DWORD dwAction,
__in LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__out LPNTMS_GUID lpPoolId
);
CreateNtmsMediaPool功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该CreateNtmsMediaPool函数创建一个新的应用程序的媒体池。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
lpPoolName [in]
名称池的新媒体。媒体池名称必须是唯一的一个单一的RSM数据库的范围。
lpMediaType [in]
标识符媒体在此媒体池类型。使用EnumerateNtmsObject函数来获取可用的媒体类型和属性的清单。应用程序可以传递一个NULL指针,以创建一个媒体池只包含其他媒体池。
dwAction [in]
要执行的动作。此参数必须是下列值之一。
ValueMeaning
NTMS_OPEN_EXISTINGOpens现有的媒介名称池。返回ERROR_OBJECT_NOT_FOUND如果池不存在。
NTMS_OPEN_ALWAYSOpens一池现有的媒体或创建池,如果它不存在。
NTMS_CREATE_NEWCreates一池新媒体。返回ERROR_ALREADY_EXISTS如果池存在。
lpSecurityAttributes [in]
可选的安全描述符用于限制访问到池中。
lpPoolId [out]
指针变量,它接收媒体池后对媒体池唯一标识符成功创建或打开。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_CONTROL_ACCESS到根游泳池或父媒体池被拒绝,而要创造一个新的媒体池中。其他安全错误也是可能的,但它们都将意味着安全子系统的错误。
Windows XP/2000操作系统:到父媒体池NTMS_MODIFY_ACCESS被拒绝,而要创造一个新的媒体池中。其他安全错误也是可能的,但它们都将意味着安全子系统的错误。
ERROR_ALREADY_EXISTSUnable池中创建一个新的媒体,因为一个已经存在具有此名称。
ERROR_DATABASE_FAILUREThe数据库无法访问或已损坏。
ERROR_DATABASE_FULLThe数据库已满。其他安全错误也是可能的,但它们都将意味着安全子系统的错误。
ERROR_INVALID_HANDLEThe会话句柄丢失或无效。
ERROR_INVALID_MEDIAThe选定的媒体类型是无效的。
ERROR_INVALID_NAMEThe池名称语法无效。 (该名称太长。)
ERROR_INVALID_PARAMETERThe媒体池名称或媒体池ID指针丢失。
ERROR_OBJECT_NOT_FOUNDUnable打开现有的媒体池中。
ERROR_SUCCESSThe功能是成功的。
备注
自由,无法识别,和导入媒体池也造成了丹参,不能与CreateNtmsMediaPool函数创建。
罗申美媒体池的编排的“\\”字符分隔的层次结构。应用程序,免费,无法识别,和导入媒体池存在的层次结构的根。丹参创建和管理的自由,无法识别,并导入池。罗申为每个创建一个媒体类型提供免费媒体池。
应用程序池的特定媒体创建的应用程序。应用为他们的根目录下的应用程序池的使用媒体池。这些媒体池,文件系统等名字。只有结束点的名称包含媒体和政策。应用程序可以定义,例如\\ MyApp的\\ Pool1和\\ MyApp的\\ Pool2池。这体现层次的用户界面,避免重复的名称。每个池的Level,必须创造个人,第一MyApp的,然后Pool1和Pool2,就像文件夹和文件。
Windows Server 2003的:要创建一个媒体池,您必须对根池和家长池NTMS_CONTROL_ACCESS。如果一个安全描述符是没有提供,池继承其父池的ACE(如果父池没有根池)。此外,创建者和本地系统帐户具有完全访问池。如果父母是根池池,它的ACE不继承;在DACL中唯一的ACE是充分的创造者和本地系统帐户访问。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
Unicode和ANSI namesCreateNtmsMediaPoolW(Unicode)和CreateNtmsMediaPoolA(ANSI)的
参见
媒体服务函数
AllocateNtmsMedia
DeleteNtmsMediaPool
GetNtmsObjectSecurity
SetNtmsObjectSecurity
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==CreateNtmsMediaPool Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The CreateNtmsMediaPool function creates a new application media pool.
Syntax
C++
DWORD CreateNtmsMediaPool(
__in HANDLE hSession,
__in LPCTSTR lpPoolName,
__in LPNTMS_GUID lpMediaType,
__in DWORD dwAction,
__in LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__out LPNTMS_GUID lpPoolId
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
lpPoolName [in]
Name of the new media pool. Media pool names must be unique within the scope of a single RSM database.
lpMediaType [in]
Identifier for the type of media in this media pool. Use the EnumerateNtmsObject function to get a list of available media types and their attributes. The application can pass a NULL pointer to create a media pool that contains only other media pools.
dwAction [in]
Action to perform. This parameter must be one of the following values.
ValueMeaning
NTMS_OPEN_EXISTINGOpens an existing media pool by name. Returns ERROR_OBJECT_NOT_FOUND if the pool does not exist.
NTMS_OPEN_ALWAYSOpens an existing media pool or creates the pool if it does not exist.
NTMS_CREATE_NEWCreates a new media pool. Returns ERROR_ALREADY_EXISTS if the pool exists.

lpSecurityAttributes [in]
Optional security descriptor used to restrict access to the pool.
lpPoolId [out]
Pointer to a variable that receives the unique identifier of the media pool after the media pool is successfully created or opened.
Return Value
This function returns one of the following values.
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_CONTROL_ACCESS to the root pool or the parent media pool is denied while trying to create a new media pool. Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP/2000: NTMS_MODIFY_ACCESS to the parent media pool is denied while trying to create a new media pool. Other security errors are also possible, but they would indicate a security subsystem error.
ERROR_ALREADY_EXISTSUnable to create a new media pool because one already exists with this name.
ERROR_DATABASE_FAILUREThe database is inaccessible or damaged.
ERROR_DATABASE_FULLThe database is full. Other security errors are also possible, but they would indicate a security subsystem error.
ERROR_INVALID_HANDLEThe session handle is missing or is not valid.
ERROR_INVALID_MEDIAThe selected media type is not valid.
ERROR_INVALID_NAMEThe pool name syntax is not valid. (The name is too long.)
ERROR_INVALID_PARAMETERThe media pool name or media pool ID pointer is missing.
ERROR_OBJECT_NOT_FOUNDUnable to open existing media pool.
ERROR_SUCCESSThe function was successful.

Remarks
Free, Unrecognized, and Import media pools are created by RSM and cannot be created with the CreateNtmsMediaPool function.
RSM media pools are organized as a hierarchy separated by the "\\" character. Application, Free, Unrecognized, and Import media pools exist at the root of the hierarchy. RSM creates and manages the Free, Unrecognized, and Import pools. RSM creates a Free media pool for each media type available.
Application-specific media pools are created by applications. Applications create media pools for their own use under the root application pool. These media pools have file system-like names. Only the end-point of the name contains media and policy. An application can define pools such as \\MyApp\\Pool1 and \\MyApp\\Pool2. This conveys the hierarchy to the user interface and avoids duplicate names. Each pool level must be created individually; first MyApp and then Pool1 and Pool2, much like folders and files.
Windows Server 2003: To create a media pool, you must have NTMS_CONTROL_ACCESS to the root pool and parent pool. If a security descriptor is not provided, the pool inherits the ACEs of its parent pool (if the parent pool is not the root pool). In addition, the creator and local system accounts have full access to the pool. If the parent pool is the root pool, its ACEs are not inherited; the only ACEs in the DACL are full access for the creator and local system accounts.
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
Unicode and ANSI namesCreateNtmsMediaPoolW (Unicode) and CreateNtmsMediaPoolA (ANSI)
See Also
Media Services Functions
AllocateNtmsMedia
DeleteNtmsMediaPool
GetNtmsObjectSecurity
SetNtmsObjectSecurity
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb525486(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:15:59