SHGetSpecialFolderPath and SHGetSpecialFolderLocation
2015-12-24 22:31
796 查看
ShGetFolderPath.]
Retrieves the path of a special folder, identified by its
CSIDL.
Copy
Type: HWND
Reserved.
lpszPath [out]
Type: LPTSTR
A pointer to a null-terminated string that receives the drive and path of the specified folder. This
4000
buffer must be at least MAX_PATH characters in size.
csidl [in]
Type: int
A
CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail.
fCreate [in]
Type: BOOL
Indicates whether the folder should be created if it does not already exist. If this value is nonzero, the folder is created. If this value is zero, the folder is not created.
TRUE if successful; otherwise, FALSE.
7/27/2011
===========================================
SHGetFolderLocation.]
Retrieves a pointer to the
ITEMIDLIST structure of a special folder.
Copy
Type: HWND
Reserved.
nFolder [in]
Type: int
A
CSIDL value that identifies the folder of interest.
ppidl [out]
Type: PIDLIST_ABSOLUTE*
A PIDL specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using
CoTaskMemFree.
If this function succeeds, it returns S_OK. Otherwise, it returns an
HRESULT error code.
SHGetSpecialFolderPath function
[SHGetSpecialFolderPath is not supported. Instead, useShGetFolderPath.]
Retrieves the path of a special folder, identified by its
CSIDL.
Syntax
C++Copy
BOOL SHGetSpecialFolderPath( HWND hwndOwner, _Out_ LPTSTR lpszPath, _In_ int csidl, _In_ BOOL fCreate );
Parameters
hwndOwnerType: HWND
Reserved.
lpszPath [out]
Type: LPTSTR
A pointer to a null-terminated string that receives the drive and path of the specified folder. This
4000
buffer must be at least MAX_PATH characters in size.
csidl [in]
Type: int
A
CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail.
fCreate [in]
Type: BOOL
Indicates whether the folder should be created if it does not already exist. If this value is nonzero, the folder is created. If this value is zero, the folder is not created.
Return value
Type: BOOLTRUE if successful; otherwise, FALSE.
Remarks
The Microsoft Internet Explorer 4.0 Desktop Update must be installed for this function to be available.Requirements
Minimum supported client | Windows 2000 Professional [desktop apps only] |
---|---|
Minimum supported server | Windows 2000 Server [desktop apps only] |
End of client support | Windows 2000 Professional |
End of server support | Windows 2000 Server |
Header | Shlobj.h |
Library | Shell32.lib |
DLL | Shell32.dll (version 4.71 or later) |
Unicode and ANSI names | SHGetSpecialFolderPathW (Unicode) and SHGetSpecialFolderPathA (ANSI) |
7/27/2011
===========================================
SHGetSpecialFolderLocation function
[SHGetSpecialFolderLocation is not supported and may be altered or unavailable in the future. Instead, useSHGetFolderLocation.]
Retrieves a pointer to the
ITEMIDLIST structure of a special folder.
Syntax
C++Copy
HRESULT SHGetSpecialFolderLocation( _In_ HWND hwndOwner, _In_ int nFolder, _Out_ PIDLIST_ABSOLUTE *ppidl );
Parameters
hwndOwner [in]Type: HWND
Reserved.
nFolder [in]
Type: int
A
CSIDL value that identifies the folder of interest.
ppidl [out]
Type: PIDLIST_ABSOLUTE*
A PIDL specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using
CoTaskMemFree.
Return value
Type: HRESULTIf this function succeeds, it returns S_OK. Otherwise, it returns an
HRESULT error code.
Requirements
Minimum supported client | Windows 2000 Professional [desktop apps only] |
---|---|
Minimum supported server | Windows 2000 Server [desktop apps only] |
End of client support | Windows 2000 Professional |
End of server support | Windows 2000 Server |
Header | Shlobj.h |
Library | Shell32.lib |
DLL | Shell32.dll (version 4.0 or later) |
相关文章推荐
- 求N个数以内的质数
- AD14中自定义PCB板形状
- poj 1651 Multiplication Puzzle 【区间dp】
- hdoj 2476 String painter 【区间dp】
- Codeforces 609B The Best Gift 【水题】
- Codeforces 607A:Chain Reaction 二分+递推
- 通过jquery实现页面的动画效果
- Codeforces 609A USB Flash Drives 【水题】
- 14443协议浅谈—TYPE_A与TYPE_B之比较[1]
- zepto
- ACM ICPC 2015 Moscow Subregional Russia, Moscow, Dolgoprudny, October, 18, 2015 D. Delay Time
- HTML__post 和 get区别【URL】
- sublime text2 ctrl+b出现错误
- myeclipse 10和myeclipse2015软件和破解工具
- 蓝桥杯 算法提高 概率计算 (概率DP)
- 前端性能优化的14个规则,学会就偷着乐
- Oracle系列之权限
- 进击python第一篇:相遇
- OCI编程之个人浅见(二)
- ui-router系列文章