Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.9 KiB

  1. // functions to get shell special folders/
  2. // shfolder.dll supports these on all platforms including Win95, Win98, NT4 and IE4 shell
  3. // all CSIDL values referred to here are supported natively by shfolder.dll, that is they
  4. // will work on all platforms.
  5. #ifndef _SHFOLDER_H_
  6. #define _SHFOLDER_H_
  7. #ifndef SHFOLDERAPI
  8. #if defined(_SHFOLDER_)
  9. #define SHFOLDERAPI STDAPI
  10. #else
  11. #define SHFOLDERAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  12. #endif
  13. #endif
  14. #ifndef CSIDL_PERSONAL
  15. #define CSIDL_PERSONAL 0x0005 // My Documents
  16. #endif
  17. #ifndef CSIDL_MYMUSIC
  18. #define CSIDL_MYMUSIC 0x000d // "My Music" folder
  19. #endif
  20. #ifndef CSIDL_APPDATA
  21. #define CSIDL_APPDATA 0x001A // Application Data, new for NT4
  22. #endif
  23. #ifndef CSIDL_LOCAL_APPDATA
  24. #define CSIDL_LOCAL_APPDATA 0x001C // non roaming, user\Local Settings\Application Data
  25. #define CSIDL_INTERNET_CACHE 0x0020
  26. #define CSIDL_COOKIES 0x0021
  27. #define CSIDL_HISTORY 0x0022
  28. #define CSIDL_COMMON_APPDATA 0x0023 // All Users\Application Data
  29. #define CSIDL_WINDOWS 0x0024 // GetWindowsDirectory()
  30. #define CSIDL_SYSTEM 0x0025 // GetSystemDirectory()
  31. #define CSIDL_PROGRAM_FILES 0x0026 // C:\Program Files
  32. #define CSIDL_MYPICTURES 0x0027 // My Pictures, new for Win2K
  33. #define CSIDL_PROGRAM_FILES_COMMON 0x002b // C:\Program Files\Common
  34. #define CSIDL_COMMON_DOCUMENTS 0x002e // All Users\Documents
  35. #define CSIDL_RESOURCES 0x0038 // %windir%\Resources\, For theme and other windows resources.
  36. #define CSIDL_RESOURCES_LOCALIZED 0x0039 // %windir%\Resources\<LangID>, for theme and other windows specific resources.
  37. #define CSIDL_FLAG_CREATE 0x8000 // new for Win2K, or this in to force creation of folder
  38. #define CSIDL_COMMON_ADMINTOOLS 0x002f // All Users\Start Menu\Programs\Administrative Tools
  39. #define CSIDL_ADMINTOOLS 0x0030 // <user name>\Start Menu\Programs\Administrative Tools
  40. #endif // CSIDL_LOCAL_APPDATA
  41. SHFOLDERAPI SHGetFolderPathA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
  42. SHFOLDERAPI SHGetFolderPathW(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
  43. // protos so callers can GetProcAddress() from shfolder.dll
  44. typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR); // "SHGetFolderPathA"
  45. typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHW)(HWND, int, HANDLE, DWORD, LPWSTR); // "SHGetFolderPathW"
  46. #ifdef UNICODE
  47. #define SHGetFolderPath SHGetFolderPathW
  48. #define PFNSHGETFOLDERPATH PFNSHGETFOLDERPATHW
  49. #else
  50. #define SHGetFolderPath SHGetFolderPathA
  51. #define PFNSHGETFOLDERPATH PFNSHGETFOLDERPATHA
  52. #endif
  53. #endif // _SHFOLDER_H_