ReactOS  0.4.13-dev-92-gf251225
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 More...
 
 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 HRESULT
Definition: msvc.h:9
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
Definition: fci.c:115
#define BOOL
Definition: nt_native.h:43
CHAR * LPTSTR
Definition: xmlstorage.h:192
unsigned int BOOL
Definition: ntddk_ex.h:94
struct CFFOLDER folder
Definition: fdi.c:110
TCHAR _fullpath[MAX_PATH]
unsigned long DWORD
Definition: ntddk_ex.h:95
#define __stdcall
Definition: typedefs.h:25
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define TEXT(s)
Definition: k32.h:26
#define CSIDL_FLAG_CREATE

Member Function Documentation

◆ operator LPCTSTR()

Definition at line 1019 of file shellclasses.h.

1020  {
1021  return _fullpath;
1022  }
TCHAR _fullpath[MAX_PATH]

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: