home *** CD-ROM | disk | FTP | other *** search
/ Imaginext Pirate Activity / ImaginextPirateActivityCD.iso / Support / Language / English / PiratesDUn.exe / SHFOLDER.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-09  |  2.6 KB  |  66 lines

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