SHGetSpecialFolderLocation

SHGetSpecialFolderLocation是一個計算機函式,函式原型為,功能為File system directory。

基本介紹

  • 外文名:SHGetSpecialFolderLocation
  • 類別:計算機函式
  • 原型:int nFolder
  • 功能:File system directory 
函式特點,套用示例,中文翻譯,

函式特點

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation( HWND hwndOwner, int nFolder, LPITEMIDLIST *ppidl); Retrieves the PIDL of a special folder. Returns NOERROR if successful, or an OLE-defined error result otherwise.hwndOwnerHandle to the owner window the client should specify if it displays a dialog box or message box.nFolderValue specifying the folder for which to retrieve the location. This parameter can be one of the following values:

套用示例

CSIDL_ALTSTARTUP
File system directory that corresponds to the user's nonlocalized Startup program group.
CSIDL_APPDATA
File system directory that serves as a common repository for application-specific data.
CSIDL_BITBUCKET
File system directory containing file objects in the user's Recycle Bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
CSIDL_COMMON_ALTSTARTUP
File system directory that corresponds to the nonlocalized Startup program group for all users.
CSIDL_COMMON_DESKTOPDIRECTORY
File system directory that contains files and folders that appear on the desktop for all users.
CSIDL_COMMON_FAVORITES
File system directory that serves as a common repository for all users' favorite items.
CSIDL_COMMON_PROGRAMS
File system directory that contains the directories for the common program groups that appear on the Start menu for all users.
CSIDL_COMMON_STARTMENU
File system directory that contains the programs and folders that appear on the Start menu for all users.
CSIDL_COMMON_STARTUP
File system directory that contains the programs that appear in the Startup folder for all users.
CSIDL_CONTROLS
Virtual folder containing icons for the Control Panel applications.
CSIDL_COOKIES
File system directory that serves as a common repository for Internet cookies.
CSIDL_DESKTOP
Windows Desktop—virtual folder at the root of the namespace.
CSIDL_DESKTOPDIRECTORY
File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
CSIDL_DRIVES
My Computer—virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
CSIDL_FAVORITES
File system directory that serves as a common repository for the user's favorite items.
CSIDL_FONTS
Virtual folder containing fonts.
CSIDL_HISTORY
File system directory that serves as a common repository for Internet history items.
CSIDL_INTERNET
Virtual folder representing the Internet.
CSIDL_INTERNET_CACHE
File system directory that serves as a common repository for temporary Internet files.
CSIDL_NETHOOD
File system directory containing objects that appear in the network neighborhood.
CSIDL_NETWORK
Network Neighborhood Folder—virtual folder representing the top level of the network hierarchy.
CSIDL_PERSONAL
File system directory that serves as a common repository for documents.
CSIDL_PRINTERS
Virtual folder containing installed printers.
CSIDL_PRINTHOOD
File system directory that serves as a common repository for printer links.
CSIDL_PROGRAMS
File system directory that contains the user's program groups (which are also file system directories).
CSIDL_RECENT
File system directory that contains the user's most recently used documents.
CSIDL_SENDTO
File system directory that contains Send To menu items.
CSIDL_STARTMENU
File system directory containing Start menu items.
CSIDL_STARTUP
File system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto Windows NT or starts Windows 95.
CSIDL_TEMPLATES
File system directory that serves as a common repository for document templates.
ppidlAddress of a pointer to an item identifier list specifying the folder's location relative to the root of the namespace (the desktop). The calling application is responsible for freeing this pointer with the shell'sIMallocinterface (seeSHGetMalloc). See alsoSHGetSpecialFolderPath

中文翻譯

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation (HWND hwndOwner, int nFolder,LPITEMIDLIST * ppidl); //函式聲明
hwndOwner: 指定了"所有者視窗",在調用這個函式是可能出現的對話框或信息框.
nFolder: 是一個整數id,決定哪個目錄是待查找目錄,它的取值可能是
CSIDL_BITBUCKET資源回收筒
CSIDL_CONTROLS控制臺
CSIDL_DESKTOP Windows桌面desktop;
CSIDL_DESKTOPDIRECTORY desktop的目錄;
CSIDL_DRIVES我的電腦
CSIDL_FONTS 字型目錄
CSIDL_NETHOOD網上鄰居
CSIDL_NETWORK 網上鄰居virtual folder
CSIDL_PERSONAL我的文檔
CSIDL_PRINTERS 印表機
CSIDL_PROGRAMS 程式組
CSIDL_RECENT 最近打開文檔
CSIDL_SENDTO 傳送到選單項
CSIDL_STARTMENU 快啟選單(開始選單)
CSIDL_STARTUP 啟動目錄
CSIDL_TEMPLATES 臨時文檔
ppidl: pidl地址. SHGetSpecialFolderLocation把地址寫到pidl.
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)

相關詞條

熱門詞條

聯絡我們