file system path of special folder More...
#include <shellclasses.h>
Public Member Functions | |
SpecialFolderFSPath (int folder, HWND hwnd) | |
file system path of special folder | |
operator LPCTSTR () | |
Protected Attributes | |
TCHAR | _fullpath [MAX_PATH] |
file system path of special folder
Definition at line 1015 of file shellclasses.h.
SpecialFolderFSPath::SpecialFolderFSPath | ( | int | folder, |
HWND | hwnd | ||
) |
file system path of special folder
Definition at line 449 of file shellclasses.cpp.
References _fullpath, CSIDL_FLAG_CREATE, and TEXT.
{ _fullpath[0] = '\0'; #ifdef UNICODE static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathW"); #else static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathA"); #endif if (*s_pSHGetSpecialFolderPath) (*s_pSHGetSpecialFolderPath)(hwnd, _fullpath, folder, TRUE); else { // SHGetSpecialFolderPath() is not compatible to WIN95/NT4 #ifdef UNICODE static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathW"); #else static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathA"); #endif if (*s_pSHGetFolderPath_shell32) (*s_pSHGetFolderPath_shell32)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath); else { // SHGetFolderPath() is only present in shfolder.dll on some platforms. #ifdef UNICODE static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathW"); #else static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathA"); #endif if (*s_pSHGetFolderPath_shfolder) (*s_pSHGetFolderPath_shfolder)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath); } } }
SpecialFolderFSPath::operator LPCTSTR | ( | ) | [inline] |
TCHAR SpecialFolderFSPath::_fullpath[MAX_PATH] [protected] |
Definition at line 1025 of file shellclasses.h.
Referenced by operator LPCTSTR(), and SpecialFolderFSPath().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |