网站首页  词典首页

请输入您要查询的函数:

 

术语 shgetknownfolderidlist
释义 SHGetKnownFolderIDList
语法:
HRESULT SHGetKnownFolderIDList( REFKNOWNFOLDERID rfid,
DWORD dwFlags,
HANDLE hToken,
PIDLIST_ABSOLUTE *ppidl
);
SHGetKnownFolderIDList功能
检索路径作为一个ITEMIDLIST结构已知的文件夹。
参数
RFID技术
[in]对KNOWNFOLDERID标识文件夹的引用。与已知的文件夹ID相关的文件夹可能不存在于特定的系统。
dwFlags
[in]旗帜,指定专门检索选项。此值可以是0,否则,它是一个或KNOWN_FOLDER_FLAG价值观。
hToken
[in]一个访问令牌用来表示一个特定的用户。此参数通常设置为NULL,在这种情况下,函数试图访问当前用户的文件夹的实例。但是,您可能需要指定一个值hToken对这些文件夹可以有多个用户,但属于单个用户处理。这一类型的最常用的文件夹中的文件。
调用应用程序负责时hToken正确模拟非空。它必须有特定的用户,包括TOKEN_QUERY和TOKEN_IMPERSONATE适当的安全权限,以及用户的注册表配置单元当前必须安装。见的访问控制问题的进一步讨论访问控制。
分配的hToken参数值为-1表示默认用户。这允许SHGetKnownFolderIDList为客户找到文件夹位置(如桌面文件夹)的默认用户。默认用户的用户配置文件复制时,任何新创建的用户帐户,并包括诸如文件和桌面特殊文件夹。任何项目添加到Default User文件夹也会出现在任何新的用户帐户。请注意,默认用户的文件夹访问需要管理员权限。
ppidl
[内]当此方法返回,包含一个指向指针的项目标识符列表的文件夹(的PIDL)。此参数是通过初始化。调用者负责释放返回的PIDL时,不再需要通过调用ILFree。
返回值
返回S_OK如果成功,或者一个错误值,否则,其中包括以下内容:
E_INVALIDARGAmong其他外,这项值可以显示,RFID技术参数引用KNOWNFOLDERID未在系统中存在。并非所有KNOWNFOLDERID值是目前所有系统上。使用IKnownFolderManager::GetFolderIds来获取当前系统的KNOWNFOLDERID值。
备注
这个函数替换SHGetFolderLocation。较旧的功能现在只是一种SHGetKnownFolderIDList包装。
来电者使用此函数必须至少有用户权限。
一些已知的文件夹,例如,文件夹,是每个用户。每个用户有一个文档文件夹不同的道路。如果hToken为NULL,空气污染指数尝试访问当前用户的文件夹的实例。如果hToken是一个有效的用户令牌,空气污染指数试图模拟用户使用此令牌,并试图访问该用户的实例文件夹。
功能信息
最低DLL版本 shell32.dll版本6.0.6000或更高
自定义ImplementationNo
Headershlobj.h
import libraryshell32.lib
最低支持操作系统 Vista
参见
SHGetKnownFolderPath,SHSetKnownFolderPath,IKnownFolder::GetPath
==英文原文==SHGetKnownFolderIDList Function
Retrieves the path of a known folder as an ITEMIDLIST structure.
Syntax
HRESULT SHGetKnownFolderIDList( REFKNOWNFOLDERID rfid,
DWORD dwFlags,
HANDLE hToken,
PIDLIST_ABSOLUTE *ppidl
);
Parameters
rfid
[in] A reference to the KNOWNFOLDERID that identifies the folder. The folders associated with the known folder IDs might not exist on a particular system.
dwFlags
[in] Flags that specify special retrieval options. This value can be 0; otherwise, it is one or more of the KNOWN_FOLDER_FLAG values.
hToken
[in] An access token used to represent a particular user. This parameter is usually set to NULL, in which case the function tries to access the current user's instance of the folder. However, you may need to assign a value to hToken for those folders that can have multiple users but are treated as belonging to a single user. The most commonly used folder of this type is Documents.
The calling application is responsible for correct impersonation when hToken is non-null. It must have appropriate security privileges for the particular user, including TOKEN_QUERY and TOKEN_IMPERSONATE, and the user's registry hive must be currently mounted. See Access Control for further discussion of access control issues.
Assigning the hToken parameter a value of -1 indicates the Default User. This allows clients of SHGetKnownFolderIDList to find folder locations (such as the Desktop folder) for the Default User. The Default User user profile is duplicated when any new user account is created, and includes special folders such as Documents and Desktop. Any items added to the Default User folder also appear in any new user account. Note that access to the Default User folders requires administrator privileges.
ppidl
[out] When this method returns, contains a pointer to the pointer to an item identifier list (PIDL) of the folder. This parameter is passed uninitialized. The caller is responsible for freeing the returned PIDL when it is no longer needed by calling ILFree .
Return Value
Returns S_OK if successful, or an error value otherwise, including the following:
E_INVALIDARGAmong other things, this value can indicate that the rfid parameter references a KNOWNFOLDERID that is not present on the system. Not all KNOWNFOLDERID values are present on all systems. Use IKnownFolderManager::GetFolderIds to retrieve the set of KNOWNFOLDERID values for the current system.
Remarks
This function replaces SHGetFolderLocation . That older function is now simply a wrapper for SHGetKnownFolderIDList.
Callers using this function must have at least User privileges.
Some known folders, for example, the Documents folder, are per-user. Each user has a different path for the Documents folder. If hToken is NULL, the API tries to access the current user's instance of the folder. If hToken is a valid user token, the API tries to impersonate the user using this token, and attempts to access that user's instance of the folder.
Function Information
Minimum DLL Versionshell32.dll version 6.0.6000 or later
Custom ImplementationNo
Headershlobj.h
Import libraryshell32.lib
Minimum operating systemsWindows Vista
See Also
SHGetKnownFolderPath , SHSetKnownFolderPath , IKnownFolder::GetPath
==原始网址==http://msdn.microsoft.com/en-us/library/bb762187(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:23:29