ReactOS 0.4.15-dev-7924-g5949c20
SpecialFolderFSPath Struct Reference

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]
 

Detailed Description

file system path of special folder

Definition at line 1015 of file shellclasses.h.

Constructor & Destructor Documentation

◆ SpecialFolderFSPath()

SpecialFolderFSPath::SpecialFolderFSPath ( int  folder,
HWND  hwnd 
)

file system path of special folder

Definition at line 449 of file shellclasses.cpp.

450{
451 _fullpath[0] = '\0';
452
453#ifdef UNICODE
454 static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathW");
455#else
456 static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathA");
457#endif
458 if (*s_pSHGetSpecialFolderPath)
459 (*s_pSHGetSpecialFolderPath)(hwnd, _fullpath, folder, TRUE);
460 else {
461 // SHGetSpecialFolderPath() is not compatible to WIN95/NT4
462#ifdef UNICODE
463 static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathW");
464#else
465 static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathA");
466#endif
467 if (*s_pSHGetFolderPath_shell32)
468 (*s_pSHGetFolderPath_shell32)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath);
469 else {
470 // SHGetFolderPath() is only present in shfolder.dll on some platforms.
471#ifdef UNICODE
472 static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathW");
473#else
474 static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathA");
475#endif
476 if (*s_pSHGetFolderPath_shfolder)
477 (*s_pSHGetFolderPath_shfolder)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath);
478 }
479 }
480}
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define TEXT(s)
Definition: k32.h:26
#define BOOL
Definition: nt_native.h:43
#define CSIDL_FLAG_CREATE
TCHAR _fullpath[MAX_PATH]
Definition: fci.c:116
#define __stdcall
Definition: typedefs.h:25
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define HRESULT
Definition: msvc.h:7
CHAR * LPTSTR
Definition: xmlstorage.h:192

Member Function Documentation

◆ operator LPCTSTR()

SpecialFolderFSPath::operator LPCTSTR ( )
inline

Definition at line 1019 of file shellclasses.h.

1020 {
1021 return _fullpath;
1022 }

Member Data Documentation

◆ _fullpath

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: