ReactOS  0.4.15-dev-3720-g4cf9b79
atlpath.h
Go to the documentation of this file.
1 // PROJECT: ReactOS ATL CPathT
2 // LICENSE: Public Domain
3 // PURPOSE: Provides compatibility to Microsoft ATL
4 // PROGRAMMERS: Benedikt Freisen
5 
6 #ifndef __ATLPATH_H__
7 #define __ATLPATH_H__
8 
9 #pragma once
10 
11 #include <atlcore.h>
12 #include <atlstr.h>
13 #include <shlwapi.h>
14 
15 namespace ATL
16 {
17 
18 template<typename StringType>
19 class CPathT
20 {
21  // const
22  inline BOOL PathFileExistsX(LPCSTR pszPath) const { return PathFileExistsA(pszPath); }
23  inline BOOL PathFileExistsX(LPCWSTR pszPath) const { return PathFileExistsW(pszPath); }
24  inline LPCSTR PathFindExtensionX(LPCSTR pszPath) const { return PathFindExtensionA(pszPath); }
25  inline LPCWSTR PathFindExtensionX(LPCWSTR pszPath) const { return PathFindExtensionW(pszPath); }
26  inline LPCSTR PathFindFileNameX(LPCSTR pszPath) const { return PathFindFileNameA(pszPath); }
27  inline LPCWSTR PathFindFileNameX(LPCWSTR pszPath) const { return PathFindFileNameW(pszPath); }
28  inline int PathGetDriveNumberX(LPCSTR pszPath) const { return PathGetDriveNumberA(pszPath); }
29  inline int PathGetDriveNumberX(LPCWSTR pszPath) const { return PathGetDriveNumberW(pszPath); }
30  inline BOOL PathIsDirectoryX(LPCSTR pszPath) const { return PathIsDirectoryA(pszPath); }
31  inline BOOL PathIsDirectoryX(LPCWSTR pszPath) const { return PathIsDirectoryW(pszPath); }
32  inline BOOL PathIsFileSpecX(LPCSTR pszPath) const { return PathIsFileSpecA(pszPath); }
33  inline BOOL PathIsFileSpecX(LPCWSTR pszPath) const { return PathIsFileSpecW(pszPath); }
34  inline BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix) { return PathIsPrefixA(pszPath, pszPrefix); }
35  inline BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix) { return PathIsPrefixW(pszPath, pszPrefix); }
36  inline BOOL PathIsRelativeX(LPCSTR pszPath) const { return PathIsRelativeA(pszPath); }
37  inline BOOL PathIsRelativeX(LPCWSTR pszPath) const { return PathIsRelativeW(pszPath); }
38  inline BOOL PathIsRootX(LPCSTR pszPath) const { return PathIsRootA(pszPath); }
39  inline BOOL PathIsRootX(LPCWSTR pszPath) const { return PathIsRootW(pszPath); }
40  inline BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther) const { return PathIsSameRootA(pszPath, pszOther); }
41  inline BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther) const { return PathIsSameRootW(pszPath, pszOther); }
42  inline BOOL PathIsUNCX(LPCSTR pszPath) { return PathIsUNCA(pszPath); }
43  inline BOOL PathIsUNCX(LPCWSTR pszPath) { return PathIsUNCW(pszPath); }
44  inline BOOL PathIsUNCServerX(LPCSTR pszPath) { return PathIsUNCServerA(pszPath); }
45  inline BOOL PathIsUNCServerX(LPCWSTR pszPath) { return PathIsUNCServerW(pszPath); }
46  inline BOOL PathIsUNCServerShareX(LPCSTR pszPath) { return PathIsUNCServerShareA(pszPath); }
47  inline BOOL PathIsUNCServerShareX(LPCWSTR pszPath) { return PathIsUNCServerShareW(pszPath); }
48  inline BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec) const { return PathMatchSpecA(pszPath, pszSpec); }
49  inline BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec) const { return PathMatchSpecW(pszPath, pszSpec); }
50  inline LPCSTR PathSkipRootX(LPCSTR pszPath) const { return PathSkipRootA(pszPath); }
51  inline LPCWSTR PathSkipRootX(LPCWSTR pszPath) const { return PathSkipRootW(pszPath); }
52 
53  // non-const
54  inline void PathAddBackslashX(LPSTR pszPath) { PathAddBackslashA(pszPath); }
55  inline void PathAddBackslashX(LPWSTR pszPath) { PathAddBackslashW(pszPath); }
56  inline BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathAddExtensionA(pszPath, pszExt); }
57  inline BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathAddExtensionW(pszPath, pszExt); }
58  inline BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore) { return PathAppendA(pszPath, pszMore); }
59  inline BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore) { return PathAppendW(pszPath, pszMore); }
60  inline void PathBuildRootX(LPSTR pszRoot, int iDrive) { PathBuildRootA(pszRoot, iDrive); }
61  inline void PathBuildRootX(LPWSTR pszRoot, int iDrive) { PathBuildRootW(pszRoot, iDrive); }
62  inline void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc) { PathCanonicalizeA(pszDst, pszSrc); }
63  inline void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc) { PathCanonicalizeW(pszDst, pszSrc); }
64  inline void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore) { PathCombineA(pszPathOut, pszPathIn, pszMore); }
65  inline void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore) { PathCombineW(pszPathOut, pszPathIn, pszMore); }
66  inline CPathT<StringType> PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath) { return PathCommonPrefixA(pszFile1, pszFile2, pszPath); }
67  inline CPathT<StringType> PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath) { return PathCommonPrefixW(pszFile1, pszFile2, pszPath); }
68  inline BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx) { return PathCompactPathA(hDC, pszPath, dx); }
69  inline BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx) { return PathCompactPathW(hDC, pszPath, dx); }
70  inline BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExA(pszOut, pszSrc, cchMax, dwFlags); }
71  inline BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExW(pszOut, pszSrc, cchMax, dwFlags); }
72  inline BOOL PathMakePrettyX(LPSTR pszPath) { return PathMakePrettyA(pszPath); }
73  inline BOOL PathMakePrettyX(LPWSTR pszPath) { return PathMakePrettyW(pszPath); }
74  inline void PathQuoteSpacesX(LPSTR pszPath) { PathQuoteSpacesA(pszPath); }
75  inline void PathQuoteSpacesX(LPWSTR pszPath) { PathQuoteSpacesW(pszPath); }
76  inline BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToA(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
77  inline BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToW(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
78  inline void PathRemoveArgsX(LPSTR pszPath) { PathRemoveArgsA(pszPath); }
79  inline void PathRemoveArgsX(LPWSTR pszPath) { PathRemoveArgsW(pszPath); }
80  inline void PathRemoveBackslashX(LPSTR pszPath) { PathRemoveBackslashA(pszPath); }
81  inline void PathRemoveBackslashX(LPWSTR pszPath) { PathRemoveBackslashW(pszPath); }
82  inline void PathRemoveBlanksX(LPSTR pszPath) { PathRemoveBlanksA(pszPath); }
83  inline void PathRemoveBlanksX(LPWSTR pszPath) { PathRemoveBlanksW(pszPath); }
84  inline void PathRemoveExtensionX(LPSTR pszPath) { PathRemoveExtensionA(pszPath); }
85  inline void PathRemoveExtensionX(LPWSTR pszPath) { PathRemoveExtensionW(pszPath); }
86  inline BOOL PathRemoveFileSpecX(LPSTR pszPath) { return PathRemoveFileSpecA(pszPath); }
87  inline BOOL PathRemoveFileSpecX(LPWSTR pszPath) { return PathRemoveFileSpecW(pszPath); }
88  inline BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathRenameExtensionA(pszPath, pszExt); }
89  inline BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathRenameExtensionW(pszPath, pszExt); }
90  inline void PathStripPathX(LPSTR pszPath) { PathStripPathA(pszPath); }
91  inline void PathStripPathX(LPWSTR pszPath) { PathStripPathW(pszPath); }
92  inline BOOL PathStripToRootX(LPSTR pszPath) { return PathStripToRootA(pszPath); }
93  inline BOOL PathStripToRootX(LPWSTR pszPath) { return PathStripToRootW(pszPath); }
94  inline void PathUnquoteSpacesX(LPSTR pszPath) { PathUnquoteSpacesA(pszPath); }
95  inline void PathUnquoteSpacesX(LPWSTR pszPath) { PathUnquoteSpacesW(pszPath); }
96 
97 public:
98  typedef typename StringType::PCXSTR PCXSTR;
99  typedef typename StringType::PXSTR PXSTR;
100  typedef typename StringType::XCHAR XCHAR;
101 
102  StringType m_strPath;
103 
104  CPathT(PCXSTR pszPath)
105  {
106  m_strPath = StringType(pszPath);
107  }
108 
110  {
111  m_strPath = path.m_strPath;
112  }
113 
114  CPathT() throw()
115  {
116  // do nothing, m_strPath initializes itself
117  }
118 
120  {
121  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
123  m_strPath.ReleaseBuffer();
124  }
125 
126  BOOL AddExtension(PCXSTR pszExtension)
127  {
128  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
129  BOOL result = PathAddExtensionX(str, pszExtension);
130  m_strPath.ReleaseBuffer();
131  return result;
132  }
133 
134  BOOL Append(PCXSTR pszMore)
135  {
136  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
137  BOOL result = PathAppendX(str, pszMore);
138  m_strPath.ReleaseBuffer();
139  return result;
140  }
141 
142  void BuildRoot(int iDrive)
143  {
144  PXSTR str = m_strPath.GetBuffer(4);
145  PathBuildRootX(str, iDrive);
146  m_strPath.ReleaseBuffer();
147  }
148 
150  {
151  StringType strTemp;
152  PXSTR str = strTemp.GetBuffer(MAX_PATH);
154  strTemp.ReleaseBuffer();
155  m_strPath = strTemp;
156  }
157 
158  void Combine(PCXSTR pszDir, PCXSTR pszFile)
159  {
160  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
161  PathCombineX(str, pszDir, pszFile);
162  m_strPath.ReleaseBuffer();
163  }
164 
166  {
167  StringType result;
168  result.SetString(m_strPath, PathCommonPrefixX(m_strPath, pszOther, NULL));
169  return result;
170  }
171 
173  {
174  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
175  BOOL result = PathCompactPathX(hDC, str, nWidth);
176  m_strPath.ReleaseBuffer();
177  return result;
178  }
179 
181  {
182  StringType strTemp;
183  PXSTR str = strTemp.GetBuffer(nMaxChars);
185  strTemp.ReleaseBuffer();
186  m_strPath = strTemp;
187  return result;
188  }
189 
190  BOOL FileExists() const
191  {
192  return PathFileExistsX(m_strPath);
193  }
194 
195  int FindExtension() const
196  {
197  PCXSTR extension = PathFindExtensionX(m_strPath);
198  if (*extension == '\0')
199  return -1;
200 
201  PCXSTR str = m_strPath;
202  return (int)(extension - str);
203  }
204 
205  int FindFileName() const
206  {
208  if (*filename == '\0')
209  return -1;
210 
211  PCXSTR str = m_strPath;
212  return (int)(filename - str);
213  }
214 
215  int GetDriveNumber() const
216  {
218  }
219 
220  StringType GetExtension() const
221  {
222  return StringType(PathFindExtensionX(m_strPath));
223  }
224 
226  {
227  return PathIsDirectoryX(m_strPath);
228  }
229 
230  BOOL IsFileSpec() const
231  {
232  return PathIsFileSpecX(m_strPath);
233  }
234 
235  BOOL IsPrefix(PCXSTR pszPrefix) const
236  {
237  return PathIsPrefixX(m_strPath);
238  }
239 
240  BOOL IsRelative() const
241  {
242  return PathIsRelativeX(m_strPath);
243  }
244 
245  BOOL IsRoot() const
246  {
247  return PathIsRootX(m_strPath);
248  }
249 
250  BOOL IsSameRoot(PCXSTR pszOther) const
251  {
252  return PathIsSameRootX(m_strPath, pszOther);
253  }
254 
255  BOOL IsUNC() const
256  {
257  return PathIsUNCX(m_strPath);
258  }
259 
261  {
262  return PathIsUNCServerX(m_strPath);
263  }
264 
266  {
268  }
269 
271  {
272  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
274  m_strPath.ReleaseBuffer();
275  return result;
276  }
277 
278  BOOL MatchSpec(PCXSTR pszSpec) const
279  {
280  return PathMatchSpecX(m_strPath, pszSpec);
281  }
282 
283  void QuoteSpaces()
284  {
285  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
287  m_strPath.ReleaseBuffer();
288  }
289 
290  BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
291  {
292  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
293  BOOL result = PathRelativePathToX(str, pszFrom, dwAttrFrom, pszTo, dwAttrTo);
294  m_strPath.ReleaseBuffer();
295  return result;
296  }
297 
298  void RemoveArgs()
299  {
300  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
302  m_strPath.ReleaseBuffer();
303  }
304 
306  {
307  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
309  m_strPath.ReleaseBuffer();
310  }
311 
313  {
314  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
316  m_strPath.ReleaseBuffer();
317  }
318 
320  {
321  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
323  m_strPath.ReleaseBuffer();
324  }
325 
327  {
328  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
330  m_strPath.ReleaseBuffer();
331  return result;
332  }
333 
335  {
336  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
337  BOOL result = PathRenameExtensionX(str, pszExtension);
338  m_strPath.ReleaseBuffer();
339  return result;
340  }
341 
342  int SkipRoot() const
343  {
344  PCXSTR str = m_strPath;
345  return (int)(PathSkipRootX(m_strPath) - str);
346  }
347 
348  void StripPath()
349  {
350  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
352  m_strPath.ReleaseBuffer();
353  }
354 
356  {
357  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
359  m_strPath.ReleaseBuffer();
360  return result;
361  }
362 
364  {
365  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
367  m_strPath.ReleaseBuffer();
368  }
369 
370  operator const StringType&() const throw()
371  {
372  return m_strPath;
373  }
374 
375  operator PCXSTR() const throw()
376  {
377  return m_strPath;
378  }
379 
380  operator StringType&() throw()
381  {
382  return m_strPath;
383  }
384 
386  {
387  Append(pszMore);
388  return *this;
389  }
390 
391 };
392 
396 
397 } // namespace ATL
398 
399 #endif
BOOL WINAPI PathIsUNCServerShareA(LPCSTR lpszPath)
Definition: path.c:2350
void PathRemoveArgsX(LPWSTR pszPath)
Definition: atlpath.h:79
BOOL PathIsRelativeX(LPCSTR pszPath) const
Definition: atlpath.h:36
BOOL PathIsUNCServerX(LPCSTR pszPath)
Definition: atlpath.h:44
LPCWSTR PathFindExtensionX(LPCWSTR pszPath) const
Definition: atlpath.h:25
CPathT< StringType > CommonPrefix(PCXSTR pszOther)
Definition: atlpath.h:165
CPathT< CStringW > CPathW
Definition: atlpath.h:395
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
Definition: path.c:2667
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1722
void PathBuildRootX(LPWSTR pszRoot, int iDrive)
Definition: atlpath.h:61
void PathQuoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:74
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
BOOL PathIsDirectoryX(LPCWSTR pszPath) const
Definition: atlpath.h:31
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
Definition: path.c:1697
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
Definition: path.c:1578
void RemoveBlanks()
Definition: atlpath.h:312
BOOL PathRemoveFileSpecX(LPSTR pszPath)
Definition: atlpath.h:86
BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:76
BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec) const
Definition: atlpath.h:48
VOID WINAPI PathQuoteSpacesA(LPSTR lpszPath)
Definition: path.c:955
void PathRemoveBlanksX(LPSTR pszPath)
Definition: atlpath.h:82
BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:56
void WINAPI PathStripPathW(LPWSTR lpszPath)
Definition: path.c:694
int FindExtension() const
Definition: atlpath.h:195
BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec) const
Definition: atlpath.h:49
GLuint64EXT * result
Definition: glext.h:11304
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
Definition: path.c:779
BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx)
Definition: atlpath.h:68
void PathUnquoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:94
int WINAPI PathCommonPrefixW(LPCWSTR lpszFile1, LPCWSTR lpszFile2, LPWSTR achPath)
Definition: path.c:2805
BOOL PathRemoveFileSpecX(LPWSTR pszPath)
Definition: atlpath.h:87
int GetDriveNumber() const
Definition: atlpath.h:215
BOOL WINAPI PathCanonicalizeW(LPWSTR lpszBuf, LPCWSTR lpszPath)
Definition: path.c:2445
BOOL IsDirectory() const
Definition: atlpath.h:225
VOID WINAPI PathRemoveBlanksA(LPSTR lpszPath)
Definition: path.c:894
BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther) const
Definition: atlpath.h:40
BOOL MakePretty()
Definition: atlpath.h:270
BOOL FileExists() const
Definition: atlpath.h:190
#define XCHAR
Definition: CPath.cpp:43
BOOL CompactPath(HDC hDC, UINT nWidth)
Definition: atlpath.h:172
BOOL WINAPI PathAppendA(LPSTR lpszPath, LPCSTR lpszAppend)
Definition: path.c:106
BOOL PathFileExistsX(LPCWSTR pszPath) const
Definition: atlpath.h:23
static HDC
Definition: imagelist.c:92
void StripPath()
Definition: atlpath.h:348
void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc)
Definition: atlpath.h:63
BOOL Append(PCXSTR pszMore)
Definition: atlpath.h:134
BOOL CompactPathEx(UINT nMaxChars, DWORD dwFlags=0)
Definition: atlpath.h:180
BOOL WINAPI PathIsPrefixA(LPCSTR lpszPrefix, LPCSTR lpszPath)
Definition: path.c:2161
BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrFrom, LPCWSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3571
void PathAddBackslashX(LPWSTR pszPath)
Definition: atlpath.h:55
BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFrom, LPCSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3545
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
Definition: path.c:1754
BOOL WINAPI PathIsSameRootA(LPCSTR lpszPath1, LPCSTR lpszPath2)
Definition: path.c:2002
BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:77
VOID WINAPI PathRemoveBlanksW(LPWSTR lpszPath)
Definition: path.c:920
BOOL WINAPI PathRenameExtensionW(LPWSTR lpszPath, LPCWSTR lpszExt)
Definition: path.c:3183
int PathGetDriveNumberX(LPCWSTR pszPath) const
Definition: atlpath.h:29
char * LPSTR
Definition: xmlstorage.h:182
void PathStripPathX(LPWSTR pszPath)
Definition: atlpath.h:91
const char * filename
Definition: ioapi.h:135
BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther) const
Definition: atlpath.h:41
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
Definition: path.c:586
int WINAPI PathCommonPrefixA(LPCSTR lpszFile1, LPCSTR lpszFile2, LPSTR achPath)
Definition: path.c:2750
BOOL PathIsRootX(LPCSTR pszPath) const
Definition: atlpath.h:38
BOOL PathIsFileSpecX(LPCSTR pszPath) const
Definition: atlpath.h:32
LPCSTR PathFindFileNameX(LPCSTR pszPath) const
Definition: atlpath.h:26
void AddBackslash()
Definition: atlpath.h:119
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
LPSTR WINAPI PathAddBackslashA(LPSTR lpszPath)
Definition: path.c:263
StringType m_strPath
Definition: atlpath.h:102
BOOL WINAPI PathAddExtensionW(LPWSTR lpszPath, LPCWSTR lpszExtension)
Definition: path.c:2637
CPathT< CString > CPath
Definition: atlpath.h:393
void BuildRoot(int iDrive)
Definition: atlpath.h:142
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
Definition: path.c:329
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
Definition: path.c:733
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
Definition: path.c:823
BOOL PathIsUNCServerX(LPCWSTR pszPath)
Definition: atlpath.h:45
BOOL IsUNCServerShare() const
Definition: atlpath.h:265
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
Definition: path.c:294
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2377
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
Definition: path.c:2890
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
Definition: path.c:2132
const WCHAR * str
CPathT(const CPathT< StringType > &path)
Definition: atlpath.h:109
void PathRemoveExtensionX(LPSTR pszPath)
Definition: atlpath.h:84
BOOL IsPrefix(PCXSTR pszPrefix) const
Definition: atlpath.h:235
CPathT< StringType > PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath)
Definition: atlpath.h:67
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:88
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1776
BOOL IsSameRoot(PCXSTR pszOther) const
Definition: atlpath.h:250
void PathRemoveExtensionX(LPWSTR pszPath)
Definition: atlpath.h:85
const char * LPCSTR
Definition: xmlstorage.h:183
BOOL PathIsUNCServerShareX(LPCWSTR pszPath)
Definition: atlpath.h:47
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
LPSTR WINAPI PathSkipRootA(LPCSTR lpszPath)
Definition: path.c:3246
void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore)
Definition: atlpath.h:65
BOOL WINAPI PathStripToRootA(LPSTR lpszPath)
Definition: path.c:716
BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1434
BOOL PathMakePrettyX(LPWSTR pszPath)
Definition: atlpath.h:73
BOOL WINAPI PathIsUNCServerA(LPCSTR lpszPath)
Definition: path.c:2300
BOOL WINAPI PathIsFileSpecA(LPCSTR lpszPath)
Definition: path.c:2111
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
Definition: path.c:1641
void PathBuildRootX(LPSTR pszRoot, int iDrive)
Definition: atlpath.h:60
Definition: rosdlgs.h:5
BOOL IsFileSpec() const
Definition: atlpath.h:230
BOOL WINAPI PathRenameExtensionA(LPSTR lpszPath, LPCSTR lpszExt)
Definition: path.c:3163
BOOL RemoveFileSpec()
Definition: atlpath.h:326
BOOL PathIsUNCX(LPCSTR pszPath)
Definition: atlpath.h:42
void PathQuoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:75
BOOL PathIsDirectoryX(LPCSTR pszPath) const
Definition: atlpath.h:30
int FindFileName() const
Definition: atlpath.h:205
_In_ LPCSTR pszDir
Definition: shellapi.h:582
#define MAX_PATH
Definition: compat.h:34
StringType::PCXSTR PCXSTR
Definition: atlpath.h:98
BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx)
Definition: atlpath.h:69
int SkipRoot() const
Definition: atlpath.h:342
LPCWSTR PathSkipRootX(LPCWSTR pszPath) const
Definition: atlpath.h:51
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL PathIsUNCX(LPCWSTR pszPath)
Definition: atlpath.h:43
BOOL PathMakePrettyX(LPSTR pszPath)
Definition: atlpath.h:72
LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
Definition: path.c:159
BOOL WINAPI PathIsPrefixW(LPCWSTR lpszPrefix, LPCWSTR lpszPath)
Definition: path.c:2176
BOOL IsRoot() const
Definition: atlpath.h:245
UINT cchMax
LPWSTR WINAPI PathSkipRootW(LPCWSTR lpszPath)
Definition: path.c:3277
BOOL PathFileExistsX(LPCSTR pszPath) const
Definition: atlpath.h:22
BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:70
void WINAPI PathStripPathA(LPSTR lpszPath)
Definition: path.c:677
CPathT< CStringA > CPathA
Definition: atlpath.h:394
BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore)
Definition: atlpath.h:59
BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
Definition: path.c:2699
BOOL PathStripToRootX(LPSTR pszPath)
Definition: atlpath.h:92
BOOL RenameExtension(PCXSTR pszExtension)
Definition: atlpath.h:334
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
CPathT< StringType > & operator+=(PCXSTR pszMore)
Definition: atlpath.h:385
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
Definition: path.c:538
BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:71
BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:290
BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix)
Definition: atlpath.h:35
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
Definition: path.c:867
int PathGetDriveNumberX(LPCSTR pszPath) const
Definition: atlpath.h:28
BOOL PathStripToRootX(LPWSTR pszPath)
Definition: atlpath.h:93
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
Definition: path.c:1601
void PathRemoveBackslashX(LPSTR pszPath)
Definition: atlpath.h:80
BOOL WINAPI PathIsRelativeA(LPCSTR lpszPath)
Definition: path.c:1562
static HDC hDC
Definition: 3dtext.c:33
void PathUnquoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:95
void WINAPI PathRemoveArgsA(LPSTR lpszPath)
Definition: path.c:756
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:422
CPathT(PCXSTR pszPath)
Definition: atlpath.h:104
VOID WINAPI PathUnquoteSpacesA(LPSTR lpszPath)
Definition: path.c:1012
LPCWSTR PathFindFileNameX(LPCWSTR pszPath) const
Definition: atlpath.h:27
BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:57
BOOL IsUNCServer() const
Definition: atlpath.h:260
BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1459
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
Definition: path.c:1034
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
BOOL PathIsRootX(LPCWSTR pszPath) const
Definition: atlpath.h:39
BOOL PathIsRelativeX(LPCWSTR pszPath) const
Definition: atlpath.h:37
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
Definition: path.c:2869
BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
Definition: path.c:2322
StringType GetExtension() const
Definition: atlpath.h:220
BOOL StripToRoot()
Definition: atlpath.h:355
GLint dx
Definition: linetemp.h:97
void UnquoteSpaces()
Definition: atlpath.h:363
LPCSTR PathSkipRootX(LPCSTR pszPath) const
Definition: atlpath.h:50
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:553
BOOL WINAPI PathCanonicalizeA(LPSTR lpszBuf, LPCSTR lpszPath)
Definition: path.c:2412
BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix)
Definition: atlpath.h:34
StringType::XCHAR XCHAR
Definition: atlpath.h:100
void Canonicalize()
Definition: atlpath.h:149
void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc)
Definition: atlpath.h:62
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
Definition: path.c:1963
CPathT< StringType > PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath)
Definition: atlpath.h:66
BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
Definition: path.c:2023
void PathRemoveBackslashX(LPWSTR pszPath)
Definition: atlpath.h:81
void PathRemoveArgsX(LPSTR pszPath)
Definition: atlpath.h:78
void Combine(PCXSTR pszDir, PCXSTR pszFile)
Definition: atlpath.h:158
StringType::PXSTR PXSTR
Definition: atlpath.h:99
BOOL IsUNC() const
Definition: atlpath.h:255
void RemoveExtension()
Definition: atlpath.h:319
VOID WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
Definition: path.c:978
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
Definition: path.c:373
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2265
WCHAR * LPWSTR
Definition: xmlstorage.h:184
void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
Definition: path.c:806
LPSTR WINAPI PathRemoveBackslashA(LPSTR lpszPath)
Definition: path.c:847
LPCSTR PathFindExtensionX(LPCSTR pszPath) const
Definition: atlpath.h:24
LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
Definition: path.c:194
void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore)
Definition: atlpath.h:64
void PathRemoveBlanksX(LPWSTR pszPath)
Definition: atlpath.h:83
BOOL PathIsUNCServerShareX(LPCSTR pszPath)
Definition: atlpath.h:46
BOOL IsRelative() const
Definition: atlpath.h:240
BOOL AddExtension(PCXSTR pszExtension)
Definition: atlpath.h:126
BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:89
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
Definition: path.c:2242
BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
Definition: path.c:1934
void PathAddBackslashX(LPSTR pszPath)
Definition: atlpath.h:54
BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore)
Definition: atlpath.h:58
void PathStripPathX(LPSTR pszPath)
Definition: atlpath.h:90
BOOL WINAPI PathAddExtensionA(LPSTR lpszPath, LPCSTR lpszExtension)
Definition: path.c:2614
BOOL PathIsFileSpecX(LPCWSTR pszPath) const
Definition: atlpath.h:33
void QuoteSpaces()
Definition: atlpath.h:283
void RemoveBackslash()
Definition: atlpath.h:305
BOOL MatchSpec(PCXSTR pszSpec) const
Definition: atlpath.h:278
void RemoveArgs()
Definition: atlpath.h:298
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
Definition: path.c:348