Public Member Functions | Protected Attributes

SpecialFolderFSPath Struct Reference

file system path of special folder More...

#include <shellclasses.h>

Collaboration diagram for SpecialFolderFSPath:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SpecialFolderFSPath (int folder, HWND hwnd)
 file system path of special folder
 operator LPCTSTR ()

Protected Attributes

TCHAR _fullpath [MAX_PATH]

Detailed Description

file system path of special folder

Definition at line 1015 of file shellclasses.h.


Constructor & Destructor Documentation

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);
        }
    }
}

Member Function Documentation

SpecialFolderFSPath::operator LPCTSTR (  ) [inline]

Definition at line 1019 of file shellclasses.h.

References _fullpath.

    {
        return _fullpath;
    }

Member Data Documentation

TCHAR SpecialFolderFSPath::_fullpath[MAX_PATH] [protected]

Definition at line 1025 of file shellclasses.h.

Referenced by operator LPCTSTR(), and SpecialFolderFSPath().


The documentation for this struct was generated from the following files:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage